PDA

View Full Version : Detect and reset screen resolution?!?!



lord_havoc
05-14-2007, 02:26 PM
I am somewhat new to javascript so I don't know its full capabilities, but is it possible for a pop-up to come up if the users screen resolution is not the specified resolution? And then, allow the user to choose if they want to change it so if they choose yes, it will change to the specified resolution?

Veronica
05-14-2007, 03:49 PM
A script to detect browser resolution is at http://www.dynamicdrive.com/dynamicindex9/info1.htm

You can't change someone's resolution. What you could do is modify the browser detection script so that it gives them a link that WILL work in different resolutions.

if (screen.Height!=correctheight)
{document.write('Or you can go <a href=differentres.htm">here</a>')};

Or (better yet) if possible, design your page with divs that can work no matter what the resolution is.

boogyman
05-14-2007, 04:04 PM
Or (better yet) if possible, design your page with divs that can work no matter what the resolution is.

not if possible. Tables were created for tabular (eg statistics) type data, not as a layout schema.

Yes you can detect the screen resolution by different scripts and redirect them accordingly, however why even make two different pages? Maintenance alone will be horrific if you have any type of substance on the page, not to mention the fact that even the most complex "table" layout is not that hard with css. It is a matter of creating your images appropriately and placing them in the right place. And as for different columns?? well there are HUNDREDs of resources online about how to create multiple columns both fixed and fluid. Visit A List Apart (http://www.alistapart.com/articles/fauxcolumns/) and it will explain.