|
-
Jun 23rd, 2000, 05:43 AM
#1
Thread Starter
Hyperactive Member
What's wrong with this code?
Code:
<script language="JavaScript"><!--
if (screen.width = 800){
if (screen.height = 600){
document.write "<BR><BR>";
}
}
if (screen.width = 1024){
if (screen.height = 768){
document.write "<BR><BR><BR>";
}
}
//--></script>
-
Jun 23rd, 2000, 02:04 PM
#2
Junior Member
This fix should work in IE and NetScape. In javascript, to find out if two things are equal, you have to use a special comparison operator: "==". A plain equal sign assigns values, and says "this is that" but a double equal sign asks "is this that?" So your code works if'n you say
if (screen.width==800){whatever}
-
Jun 23rd, 2000, 11:07 PM
#3
Thread Starter
Hyperactive Member
I tried that, it still doesn't work.
-
Jun 24th, 2000, 10:02 AM
#4
Hyperactive Member
Wouldn't you have to use parethesens?
document.write("xxxx");
"People who think they know everything are a great annoyance to those of us who do."
-
Jun 24th, 2000, 10:33 AM
#5
Thread Starter
Hyperactive Member
THANKS
THANK YOU! It works now. Go to http://www.olemac.net/~hutch to see it in action.
-
Jun 25th, 2000, 02:30 AM
#6
Hyperactive Member
Hey, I get a 404 error in the top frame it looks like:
Not Found
The requested URL /~hutch/msagent.html was not found on this server.
Apache/1.3.9 Server at http://www.olemac.net Port 80
And on a side not, those are some of the bad habits you can pick up from using VB too much
"People who think they know everything are a great annoyance to those of us who do."
-
Jun 25th, 2000, 02:56 AM
#7
Thread Starter
Hyperactive Member
I think it was just a naming error, and the top frame isn't supposed to be visible, what browser are you using? Does it work now?
-
Jun 25th, 2000, 03:32 AM
#8
Hyperactive Member
I'm using Netscape and yup theres no error anymore. The top half of the page is just a blank frame.
"People who think they know everything are a great annoyance to those of us who do."
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|