- This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
Viewing 5 posts - 1 through 5 (of 5 total)
- The forum ‘JavaScript’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › JavaScript › Auto detect (with redirect) sreen res…
Hi guys, building a site at the moment with a horizontal layout optimised for 1280 x 1024 using scrollto to navigate sideways. I’m not entirely comfortable with the result viewed at less resolution than that however – does not look good at all.
I just don’t think that a fluid layout would work, is there a Javascript snippet I could use that would automatically detect the viewer’s screen res and redirect them to an appropriate stylesheet?
Any sort of help or pointers greatly appreciated – I know nothing of Javascript I’m afraid, but even a good tut might do the trick…?
I needed this once but ended up finding a different solution.
http://www.pageresource.com/jscript/jscreen.htm
or
http://andylangton.co.uk/articles/javas … esolution/
or
Excellent – I’ll have a look now. Thanks a mil! :)
EDIT – Ok, your second link gave me what seems to be the ideal snippet:
None of the links however assume that I'm as Javascript ignorant as I truly, truly am - how do I implement this? I'm assuming this goes into a initial index page in the HEAD section, and then it automatically redirects someone to the ideal page without them noticing anything. Is this correct?
Yeah, you would put this particular script. Some scripts require an additional function call later in the body, but that is not the case with this one. I haven’t used the script so I’m not sure how noticable or unnoticable the redirect will appear to the user. Keep us updated and let me know if you need further help testing. :)
Coolaboola.
Ta again!