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

simple if cause Object expected

Status
Not open for further replies.

scrsadmin

Technical User
May 3, 2004
62
US
What is wrong with this code? I keep getting
Microsoft JScript runtime error: Object expected for the line that has the if statement
icrosoft JScript runtime error: Object expected

var test = "3";
If (test == "3")
{
test = "2";
}
 
Nothing appears to be wrong. However, you will get that error message if your quotes are unbalanced (like: If (test == "3)).

_________________
Bob Rashkin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top