hgmme@wa Posted November 26, 2007 Share Posted November 26, 2007 For some reason I'm getting that error message when I load the page and I fail to see why.Here's the relative code. if (pages_in=="PR") { var url="sidebar_update.php"; var params="pages_in=" + pages_in.value; xmlHttp.onreadystatechange=stateChangedS1; xmlHttp.open("POST",url,true); xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded"); xmlHttp.setRequestHeader("Content-Length", params.length); xmlHttp.send(params); } else (pages_in=="PE") { document.getElementById("pages").innerHTML=retract.innerHTML;} Thanks in advance for your help... Link to comment Share on other sites More sharing options...
Ingolme Posted November 26, 2007 Share Posted November 26, 2007 It's:else if (pages_in=="PE") { Link to comment Share on other sites More sharing options...
aspnetguy Posted November 26, 2007 Share Posted November 26, 2007 else {}andelse if() {}are 2 different things. Link to comment Share on other sites More sharing options...
hgmme@wa Posted November 26, 2007 Author Share Posted November 26, 2007 I thought i remembered that there was suppost to be an if in there... When I went w3schools website to check if the "else" and "if" were was suppost to be together or not I didn't scroll down enough to see the else if, so i saw the if () {...} else {...}... and thought hmm it's only suppost to be "else"... now I feel like a complete dumby. thanks... Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.