Click here to Skip to main content
15,921,113 members
Home / Discussions / JavaScript
   

JavaScript

 
Questionchanging size of web page Pin
Member 832305616-Oct-11 3:16
Member 832305616-Oct-11 3:16 
AnswerRe: changing size of web page Pin
AspDotNetDev16-Oct-11 10:18
protectorAspDotNetDev16-Oct-11 10:18 
AnswerRe: changing size of web page Pin
Dennis E White17-Oct-11 10:32
professionalDennis E White17-Oct-11 10:32 
GeneralRe: changing size of web page Pin
Member 832305618-Oct-11 4:40
Member 832305618-Oct-11 4:40 
GeneralRe: changing size of web page Pin
Dennis E White18-Oct-11 11:53
professionalDennis E White18-Oct-11 11:53 
GeneralRe: changing size of web page Pin
Member 832305619-Oct-11 0:50
Member 832305619-Oct-11 0:50 
GeneralRe: changing size of web page Pin
Dennis E White19-Oct-11 3:42
professionalDennis E White19-Oct-11 3:42 
AnswerRe: changing size of web page Pin
davidshenba17-Oct-11 23:50
davidshenba17-Oct-11 23:50 
JavaScript
myHeight = window.screen.height; //this gives screen height
myWidth = window.screen.width; //this gives screen widht


If you want to find only the usable area (space that remains after taskbar etc) use "availHeight" and "availWidth"

So you can have various CSS classes for the various screen resolutions and by checking user's resolution you can change them on the fly!

CSS:

CSS
.class1024 {
color : "green";
}
.class800 {
color : "blue";
}


JavaScript:

JavaScript
if(myWidth == 1024) {
  elem.className='class1024'; 
}
else if (myWidth == 800) {
  elem.className='class800'; 
}


Hope this helps!
-Shenbaga Murugan Paramasivapandian
I hate computers and I just mess them up with my code!

AnswerRe: changing size of web page Pin
Morgs Morgan20-Oct-11 21:00
Morgs Morgan20-Oct-11 21:00 
QuestionDisplay Large Image in Small Space Pin
ASPnoob15-Oct-11 13:46
ASPnoob15-Oct-11 13:46 
AnswerRe: Display Large Image in Small Space Pin
AspDotNetDev15-Oct-11 19:54
protectorAspDotNetDev15-Oct-11 19:54 
GeneralRe: Display Large Image in Small Space Pin
ASPnoob15-Oct-11 20:29
ASPnoob15-Oct-11 20:29 
QuestionRead from excel and download new file using javascript Pin
Member 769859611-Oct-11 18:24
Member 769859611-Oct-11 18:24 
AnswerRe: Read from excel and download new file using javascript Pin
Dennis E White11-Oct-11 19:58
professionalDennis E White11-Oct-11 19:58 
GeneralRe: Read from excel and download new file using javascript Pin
Member 769859612-Oct-11 0:35
Member 769859612-Oct-11 0:35 
GeneralRe: Read from excel and download new file using javascript Pin
Dennis E White12-Oct-11 8:02
professionalDennis E White12-Oct-11 8:02 
GeneralRe: Read from excel and download new file using javascript Pin
Member 769859612-Oct-11 19:42
Member 769859612-Oct-11 19:42 
AnswerRe: Read from excel and download new file using javascript Pin
Member 769429911-Oct-11 20:27
Member 769429911-Oct-11 20:27 
QuestionHow do I get the value of a drop down list into a javascript based table? Pin
shabbarank511-Oct-11 0:46
shabbarank511-Oct-11 0:46 
AnswerRe: How do I get the value of a drop down list into a javascript based table? Pin
Dennis E White11-Oct-11 19:45
professionalDennis E White11-Oct-11 19:45 
GeneralRe: How do I get the value of a drop down list into a javascript based table? Pin
shabbarank511-Oct-11 22:16
shabbarank511-Oct-11 22:16 
QuestionCreating a Javascript table and populating from php/mysql list Pin
shabbarank57-Oct-11 1:17
shabbarank57-Oct-11 1:17 
AnswerRe: Creating a Javascript table and populating from php/mysql list Pin
Manfred Rudolf Bihy7-Oct-11 2:31
professionalManfred Rudolf Bihy7-Oct-11 2:31 
GeneralRe: Creating a Javascript table and populating from php/mysql list Pin
shabbarank57-Oct-11 2:34
shabbarank57-Oct-11 2:34 
GeneralRe: Creating a Javascript table and populating from php/mysql list Pin
Manfred Rudolf Bihy7-Oct-11 3:06
professionalManfred Rudolf Bihy7-Oct-11 3:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.