Can some one help me here? This is my code
function checkpass(pass)
{
var syspass = "1456";
if(pass==syspass)
{ window.location="home.html"; }
else
{ alert("That password is in incorrect"); }
}
...
...
...
When I run it is gives me an error saying "Object Expected". I don't get it!
Comments
:
: function checkpass(pass)
: {
: var syspass = "1456";
: if(pass==syspass)
: { window.location="home.html"; }
: else
: { alert("That password is in incorrect"); }
: }
: ...
: ...
: ...
:
:
:
:
:
: When I run it is gives me an error saying "Object Expected". I don't
: get it!
:
:
I tested your code in Firefox and it seemed to work but here is a version that has a better chance of working in more browsers.
[code]
function checkpass(pass)
{
var syspass = "1456";
if(pass==syspass)
{ window.location="home.html"; }
else
{ alert("That password is incorrect"); }
}
...
...
...
[/code]
Get Firefox so you can get more informative error messages. It helps when you see the line number and the variable name causing the problem.