could be easily modified to add these values:
http://www.depressedpress.com/DepressedPress/Content/ColdFusion/Essays/GetRe
s/Index.cfm
Of course the function below will only work in browsers where Java is
installed.
Jim Davis
_____
From: Nick Baker [mailto:[EMAIL PROTECTED]
Sent: Friday, July 02, 2004 3:18 PM
To: CF-Talk
Subject: Obtaining Browser Size
CF 5.0
I found the below _javascript_ function to determine the size of the visitors
browser. I would like to extract the width to a CF variable for later use.
Can anyone tell me how to do this or another method of obtaining this info.
Thanks,
Nick
<SCRIPT LANGUAGE="_javascript_1.1">
var tool = java.awt.Toolkit;
var size = new
java.awt.Dimension(tool.getDefaultToolkit().getScreenSize());
var myWidth = size.width;
var myHeight = size.height;
if (myWidth >= 800) {
// User has 800 pixels or more of screen width.
window.open('about:', 'test_window', 'width=700,height=1000');
}
else {
// User has small screen width.
window.open('about:', 'test_window', 'width=400,height=200');
}
</SCRIPT>
_____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

