Open a new window on click

In this tutorial we'll make a link tag which opens the link in new window.
  New_Window

The Following effects will only work with the following browsers only.

Sometimes you may want to display user some information but doesn’t want them to navigate away from the current page especially when you want to display the terms before the user agrees to it. Here is the java script that you can use which does not need any external files to work.

<a href="javascript:;"onClick="window.open('http://techstream.org/ ','','toolbar=yes,scrollbars=yes,menubar=yes,resizable=1');
"title="name">link name</a>

You can also change the availability of the tools in the new window.
     toolbar=yes/no according to your choice the toolbar will be avalible.
     scrollbars=yes/no according to your choice the scroll bar will be avalible.
Demo
1.No tool bar
2.No tool bar and scroll bar
3.with tool bar and scroll bar

Note : All the above fuction like scrollbar and other are not supported by all the browser.

To close keep a button to close the new oped window put this script

<a   width="7%" onclick="self.close();">Close X  </a>

Previous:
Next:
Anush

Anush

Anush is a freelance web designer and developer with a passion for interaction design. He founded Tech Stream in mid 2011 to spread the art of web design and programing Skills.

  • Social Links:
comments powered by Disqus