Jump to content

missing ; before statement...


hgmme@wa

Recommended Posts

Picture%201.pngFor 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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...