Tannin
Storage? I am Storage!
What's wrong with this code?
It works fine in IE 5.0, IE 6., and Mozilla. In Opera 7.23 I get the text and it's functional but no stylesheet - just plain vanilla black and white text. In Opera 6.05, I just get a blank page.
OK, OK, mayube the correct question is "what's wrong with Opera", but I suspect that the real answer is that I have some bad code somewhere and that IE and Mozilla are coveringup my mistakes for me. Be nice to nail it.
<head>
<script>
<!--
var width1=1025
var width2=1281
if (screen.width<width1) {
document.write ('<link rel="stylesheet" type="text/css" href="t1024.css">\n');}
else if (screen.width<width2) { document.write ('<link rel="stylesheet" type="text/css" href="t1280.css">\n');}
else { document.write ('<link rel="stylesheet" type="text/css" href="t1600.css">\n');}
--!>
</script>
</head>
<body>
Assorted text and stuff goes here .....
It works fine in IE 5.0, IE 6., and Mozilla. In Opera 7.23 I get the text and it's functional but no stylesheet - just plain vanilla black and white text. In Opera 6.05, I just get a blank page.
OK, OK, mayube the correct question is "what's wrong with Opera", but I suspect that the real answer is that I have some bad code somewhere and that IE and Mozilla are coveringup my mistakes for me. Be nice to nail it.
<head>
<script>
<!--
var width1=1025
var width2=1281
if (screen.width<width1) {
document.write ('<link rel="stylesheet" type="text/css" href="t1024.css">\n');}
else if (screen.width<width2) { document.write ('<link rel="stylesheet" type="text/css" href="t1280.css">\n');}
else { document.write ('<link rel="stylesheet" type="text/css" href="t1600.css">\n');}
--!>
</script>
</head>
<body>
Assorted text and stuff goes here .....