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

error using innerHTML

Status
Not open for further replies.

tsherfy

Programmer
Dec 23, 2000
20
US
Could someone please explain why I am receiving the error:

"Object expected"

when I run this code:

strTemp = document.all("Table").rows(0).cells(0).innerHTML;
intTempHTML = strTemp.indexOf("&");
strTemp = strTemp.substring(0, intTempHTML);
document.all("Table").rows(0).cells(0).innerHTML = strTemp;

I have printed out the variables after each step, and everything appears fine until it hits the last line. I normally script using VBScript, so the javascript nuances are new to me. Any help would be greatly appreciated. Thanks!

Tim
 
Scratch the question. My problem was within the "Switch" clause. I wasn't ending each case with the "break" command.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top