Another screen resolution question 
Author Message
 Another screen resolution question

I found a recent posting that demonstrated "if(screen.availWidth<1000)" as a
test for screen resolution.

Using that code, I am attempting to control which Array.js file to call, so
that the nemu can be placed at an appropriate location depending upon screen
size.  The following example DID NOT work.

if(HM_IsMenu) {

if(screen.availWidth<1000)
 document.write("<SCR" + "IPT LANGUAGE='JavaScript1.2' SRC='js/HM_Arrays.js'
TYPE='text/javascript'><\/SCR" + "IPT>");
if(screen.availWidth>1000)
 document.write("<SCR" + "IPT LANGUAGE='JavaScript1.2'
SRC='js/HM_Arrays_hires.js' TYPE='text/javascript'><\/SCR" + "IPT>");

 document.write("<SCR" + "IPT LANGUAGE='JavaScript1.2' SRC='js/HM_Script"+
HM_BrowserString +".js' TYPE='text/javascript'><\/SCR" + "IPT>");

Quote:
}

This was the original code, which does funciton correctly.

if(HM_IsMenu) {
document.write("<SCR" + "IPT LANGUAGE='JavaScript1.2' SRC='js/HM_Arrays.js'
TYPE='text/javascript'><\/SCR" + "IPT>");
 document.write("<SCR" + "IPT LANGUAGE='JavaScript1.2' SRC='js/HM_Script"+
HM_BrowserString +".js' TYPE='text/javascript'><\/SCR" + "IPT>");

Quote:
}

Your kind assistance is much appreciated - FYI, I am by no means a
javascript coder, just trying to find something that looked like it would
work.

Thanks,
Greg



Fri, 16 Apr 2004 13:36:56 GMT  
 Another screen resolution question
javascript is case sensitive. I thought it was screen.availWidth not screen.availwidth

i don't have my reference book handy to check, but it could be that....

and when you say 'it did not work', did you get an error message? did it just fail? what happened?

Atrax - MVP [Microsoft Most Valued Professional]

http://www.infinitemonkeys.ws/
http://www.sydneypubguide.net/
http://www.atrax.ws/

Host with me for $100 a year!
http://www.atrax.ws/hosting/

please do not reply directly to this email address

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Sun, 18 Apr 2004 08:43:25 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Novice scripting question (screen resolution)...

2. How do I change Screen Resolutions?

3. resolution of the screen

4. How do I change Screen Resolutions?

5. Screen resolution checking

6. HELP need script to change screen resolution

7. Frameset Row Size dependent on Screen Resolution

8. Setting screen resolution...

9. How to can I get the screen resolution

10. User′s screen resolution

11. Getting Screen Resolution

12. screen resolution

 

 
Powered by phpBB® Forum Software