Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Obtaining screen sizes

Status
Not open for further replies.

gm456

Programmer
Aug 4, 2000
11
0
0
GB
I'm using JavaScript in a couple of places to allow me to define a screen size in forms (example below) but can I get this variable somehow into CF?

Eg, it the resolution is set to 800x600, the intro screen should only display 2 columns, if it is 1024x768 I can use three columns.

TIA
gm456

-
<SCRIPT LANGUAGE=&quot;JavaScript1.2&quot;>

document.write(&quot;<INPUT TYPE='TEXT' tabindex='6' NAME='resolution' size='5' value='&quot;);
<!-- Begin
if (screen.height >= 768 && screen.width >= 1024) {
document.write(&quot;6'>&quot;);
}
else {
if (screen.height == 600 && screen.width == 800) {
document.write(&quot;5'>&quot;);
}
else {
document.write(&quot;4'>&quot;);
}
}
// End -->
</script> [sig][/sig]
 
I've sort of answered this one myself - cf_browserhawk is a plug in that gives you this facility, although I'd still like to be able to do it without third party products [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top