Opening A New Browser Window
Sometimes you don’t want the visitor to leave your current page. So when a link it clicked, instead of a new page loading on the same window, you can have the page in a new browser window. All you have to do is:
<a href="#" onClick=window.open("TheLink")>New Window</a>
This opens the link in a new browser window.
But this is a very simplistic approach, and the function window.open() has many parameters that can control the over-all appearance of your click-generated window to the world.
For example, you can have:
Let us give proper regard to all the parameters one by one:
Please don’t take TheLink to be some keyword. In its place, you have to supply the actual link to the file you want to open in the new window, for instance, http://www.bytesworth.com.
Location is the place in the browser window where you type the URL of a site you want to go to. If you have location=no, then the new window does not have the location bar.
You can get rid of the menu bar by mentioning menubar=no.
Self-explanatory. You can specify the height and width of the window to wrap around a specific text or image.
the parameter – status – has nothing to do with some sort of status symbol of society. It’s the bar you see at the bottom of every programs window. In your browser, the status bar often shows how many images are being loaded, or the page is being opened, or you are on a secure server (the lock), etc. If you don’t want to the status bar to be visible in your new browser window, set status=no.
The new browser window has a fixed size if you set resizable=no, and the user can manipulate the size if resizable=yes.
You can make the scrollbar (the horizontal bar on the right side of your screen that has a square or a rectangular apparatus to help you move the page up and down with you mouse or some other pointing device) disappear by scrollbar=no.
So finally we can have a window like this: