|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hello,
Can anyone please tell me how to get the Screen Resolution of the user using Jscript please? Thanks in advance Nerd2 |
|
#2
|
|||
|
|||
|
in internet explorer, the definitions are as such: <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>var scrnw = window.screen.width; var scrnh = window.screen.height; NOTE: feel free to edit the variables for them as you feel necessary.[/quote] in Netscape, the definitions are like this: <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>var toolkit = Packages.java.awt.Toolkit.getDefaultToolkit(); var screen_size = toolkit.getScreenSize(); var scrnwd = screen_size.width; var scrnht = screen_size.height; NOTE: feel free to edit the variables for them as you feel necessary, but be sure that the definitions of the variables reflect the new titles.[/quote] hope this helps! CujoRbd |
|
#3
|
||||
|
||||
|
Or cross browser:
pageW=document.layers?innerWidth:document.body.offsetWidth; pageH=document.layers?innerHeight:document.body.offsetHeight; alert("width="+pageW+"height="+pageH) ------------------ Simon Wheeler FirePages -DHTML/PHP/MySQL |
![]() |
| Viewing: Dev Shed Forums > Web Design > HTML Programming > Screen Resolution |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|