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 Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Screen Object

Status
Not open for further replies.

ibby

Programmer
Joined
Aug 21, 2000
Messages
7
Location
GB
Any views on this one. Following code used to perform a simple browser check.

<html>
<head>
<title>Test Page</title>
<meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot;>
<script language=&quot;JavaScript&quot;>
<!--
window.location = &quot;Main/browserchecks.asp?java=10&width=0&quot;;
//-->
</script>
<script language=&quot;JavaScript1.1&quot;>
<!--
window.location = &quot;Main/browserchecks.asp?java=11&width=0&quot;;
//-->
</script>
<script language=&quot;JavaScript1.2&quot;>
<!--
if (Screen.Width<600)
window.location = &quot;Main/browserchecks.asp?java=12&width=0&quot;;
else
window.location = &quot;Main/browserchecks.asp?java=12&width=600&quot;;
//-->
</script>
<META HTTP-EQUIV=&quot;REFRESH&quot; CONTENT=&quot;1; URL=Main/browserchecks.asp&quot;>

</head>

<body bgcolor=&quot;#c6def7&quot;>
<center>
<p> </p>
<p> </p>
<p> </p>
<a href=&quot;Main/browserchecks.asp&quot;><img src=&quot;Images/loginmain.gif&quot; width=&quot;100&quot; height=&quot;40&quot; border=&quot;0&quot;></a>
</center>
</body>
</html>

Two different PCs, both Win98 and IE 5.0 (slightly differing builds). One works ok, the other brings up the debug window indicating the

if (Screen.Width<600)

line stating that

'Screen' is undefined.

Any thoughts? I have had a look at the obvious things, but I am at a bit of a loss on this one!#

Ta

Ibby [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top