View Full Version : How to open small Tab or new page in HTML?

21-07-2008, 07:04 PM
On my Web Site I have Thumbnail graphics linked to full size ones. Up to now the page has been replaced with the graphic and you go back to the main page. With the advent of Tabs I would like the graphic to go to a new page on a Tab. This is OK, but how can I restrict the size of the page to the size of the graphic so it doesn't obscure the original page? I see it all the time - but how?

22-07-2008, 09:51 AM
You will need to use javascript to get this done.

Some examples here (http://www.pageresource.com/jscript/jwinopen.htm), here (http://www.yourhtmlsource.com/javascript/popupwindows.html), here (http://www.quirksmode.org/js/popup.html) and here (http://www.blooberry.com/indexdot/html/topics/windowopen.htm).

The first was pretty easy to follow, but uses a button instead of thumbnails. The 2nd & 3rd links seem to be what you're looking for.

As for tabs, if you're browser opens the popup in a tab, it will take up the whole window & there is no way to set it to a smaller size.
If you set the width & height options, the popup will open in a smaller window on those browsers that don't open a new tab.