|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Is there any way to get resolution of clien'ts monitor through Javascript? I mean when user access site home page, through some mechanison javascript will send client's present screen resolution to server.
So that at server, programme will change .htm/.html file to suit client's screen resolution. [This message has been edited by ads (edited May 04, 2000).] |
|
#2
|
||||
|
||||
|
The browser sniffing is a bit dodgy - but it works , note only looking for 4+ browsers here less than that or AOL end up at the nobrowser page. Call it from your onload on your index page.
function fourplus() { browser = (((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) >= 4 )) | | ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4 ))) lessthanseven=(window.screen.width <=700) morethanseven=(window.screen.width >=700) bigbugger=(window.screen.width >= 900) if (browser && bigbugger) { window.location = "/1024/index.html} else if (browser && lessthanseven) { window.location = "/640/index.html"; } else if (browser && morethanseven) { window.location = "/800/index.html"; } else window.location="nobrowser.html"; //(where AOL users end up) } Regards Simon. ------------------ Simon Wheeler FirePages -DHTML/PHP/MySQL |
![]() |
| Viewing: Dev Shed Forums > Web Design > HTML Programming > Change programme to suit client's screen resolution |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|