open new window on click

open new window on click

Open a new window on click

In this tutorial we'll make a link tag which opens the link in 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="' ','','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.
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>

About the Author


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.


Wow ! you have someting to tell us. That's great! Please keep in mind that comments are moderated, we employ rel="nofollow" for links, avoid using a spammy word or a domain as your name, it might end up as a spam. Thanks for reading.

comments powered by Disqus

Back to Top