[Javascript] Object expected error
Madison County Online
madcoonline at madcoonline.com
Tue Nov 19 09:09:15 CST 2002
Mr. Myers,
I noticed you were able to answer a question on one of the sites I came
accross while trying to solve a java script error. Maybe you could help
with this one. I have pasted the code into the bottom of this for you to
look at. I received it from
http://javascript.internet.com/passwords/cookie-in.html. The second part of
the code keeps giving the me following error:
Line: 10 which happens to be this line---
if(GetCookie('FreeStuffL') == null) {
Char: 1
Error: Object Expected
Code: 0
The code:
<BODY>
<SCRIPT>
<!-- Begin
if(GetCookie('FreeStuffL') == null) {
alert ("I'm sorry. You can not view this area! You will be bounced to the
login page...")
location.href="pass.html"
}
else
{
document.write("<center><font size=5 color=red>Welcome
"+GetCookie('FreeStuffL')+"! </font><font size=4 color=red>Thank you for
entering the Javascript Source Password Protected Area. You have access to
all files and scripts in this area.</font>");
document.write("<hr><br>The following options will help you keep track of
the Members-Only Section..<br>");
document.write("<p><a href=index.html>Go back to The Javascript Source Home
Page</a>");
document.write("<form><input type=button onClick='nameWhat()' value='What is
my login name?'></form>");
document.write("<form><input type=button value='Erase your account or change
your login name!' onClick='DeleteCookie ()'></form>");
document.write("<a href=mailto:antispammer at earthling.net>Mail
antispammer at earthling.net</a>");
document.write("<hr><font size=5>T</font>he following items can not be
accessed by users that do not have security clearence.<br>");
document.write("<form><input type=button value='Info about how this login
page works.' onClick='pageInfo ()'></form><br>");
document.write("<p><font size=5 color=green>This page will, of course, be
updated very often! And once again, thanks for registering!</center>");
}
document.write ("<font size=1 color=white>");
// End -->
</SCRIPT>
High regards and Thanks in advance,
Mike Flanders
More information about the Javascript
mailing list