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

Am I completely crazy??? Window size problem...

Status
Not open for further replies.

Magnificat

Technical User
Apr 17, 2001
38
0
0
US
Code:
<script language=&quot;JavaScript&quot;>
<!--
var ns4 = (document.layers) ? 1 : 0;
var ie4 = (document.all) ? 1 : 0;
var ns6 = (document.getElementById &&! document.all) ? 1 : 0;

var doc_width=800;
if (ns4 || ns6) { doc_width = self.innerWidth; }
else if (ie4) { doc_width = document.body.clientWidth; }
// -->
</script>

Will somebody please tell me why this isn't working? It's giving an object expected error in IE6 and not executing the script at all in NS4. I haven't tested NS6... I think I must be going mad... :cool:
 
by the way, this is almost stolen from another script, in which it works perfectly... i really do think i'm going mad... X-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top