This is a discussion on "resizing windows according to OS/browser/resolution?" within the JavaScript Forum section. This forum, and the thread "resizing windows according to OS/browser/resolution? are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
resizing windows according to OS/browser/resolution?
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
I have a window which is opened as a pop-up by a JavaScript. On my Mac, it opens fine, but on Windows, it seems it doesn't even open wide enough for the complete graphic, let alone for the text at the bottom.
Is there any way I can open the window at different sizes according to OS/browser/screen resolution? Or is this idea a can of worms? Pop-up window (617.html): <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html;charset=iso-8859-1"> <meta name="generator" content="Taco HTML Edit"> <link rel="stylesheet" href="../../styles.css" type="text/css"> <title>61/7 - Insular Motif - Ribblehead</title> </head> <body> <table class="picture_popup" summary="line-up table"> <tr> <td> <img src="617.gif" alt="61/7 - Insular Motif - Ribblehead" width="566" height="395" border="0"> </td> </tr> <tr> <td> <div class="sizesmaller"> <b><i>61/7 - Insular Motif - Ribblehead - Water-Colour - 880x620 - 1991</i></b> <br><br> <b><a href="#" onclick="javascript:window.close();">CLOSE WINDOW</a></b> </div> </td> </tr> </table> </body> </html> javascript: <script language='javascript' type="text/javascript"> //-- this function opens the new, empty window named floater, h=500,w=500 function openWindow(url,iW,iH) { winStats='toolbar=no,location=no,directories=no,me nubar=no,' winStats+='scrollbars=yes,width=' + iW + ',height=' + iH if (navigator.appName.indexOf("Microsoft")>=0) { winStats+=',left=10,top=10' }else{ winStats+=',screenX=10,screenY=10' } floater=window.open(url,"",winStats) } //--> </script> Calling the script: <a href="javascript:openWindow('Gallery/Watercolours/617.html',590,470);">(61/7) Ribblehead</a> CSS classes: .picture_popup { margin: 10px; } .sizesmaller { font-size: smaller; text-align: center; } |
|
|
|
||||
|
Re: resizing windows according to OS/browser/resolution?
IE has its own method for setting the height and width of a window. You have to define var's iH and iW after the body tag:
IE recognizes this method for resizing the window:
|
![]() |
| Tags |
| resizing, windows, according, osbrowserresolution |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [SOLVED] Resizing text in a browser | Nimster | Web Page Design | 2 | Nov 7th, 2007 11:50 |
| Cross browser and resolution compatability? | Powelly | Web Page Design | 2 | Jun 8th, 2007 14:20 |
| How can I know the user's resolution | QuikFrozen | JavaScript Forum | 5 | Aug 9th, 2006 15:03 |
| Resolution Fix | Udabar | JavaScript Forum | 6 | Apr 10th, 2006 02:23 |
| Two problems - image alignment and new browser windows. | DrRedSkwirrell | Web Page Design | 9 | Oct 29th, 2005 00:51 |