[Javascript] Re: Objected Expected

SoitPP at aol.com SoitPP at aol.com
Sat May 4 13:56:36 CDT 2002


> Erm ....
> how would expect the parser to cope with
> string = string.substring(0,-1) ??
> 
> This is what you are doing when the "<TEXTAREA" string is not present and 
you
> persist with your faulty if condition!
> 
> Rodney
    
Hi, thanks for responding, I apologize for not making it clearer that I was 
getting the same objected expected error even with the remedied if statement. 
However it turns out I've already found what I did wrong. And I was pointing 
right at it! What confused me was that the error produced pointed to char 1 
in the line. 

string.substring(indexOf("</TEXTAREA>",string.length))

produces object expected because indexOf requires a string object. indexOf is 
a string method. I forgot to include the string. part of string.indexOf(. . 
.) 
Thanks for your attention.
 peace, Aaron



More information about the Javascript mailing list