[thelist] A javascript question

Peter-Paul Koch gassinaumasis at hotmail.com
Thu May 17 09:38:43 CDT 2001

>In one script, I use
>variable = "something"+top.location+"something else" ;
>And when I run this script, I have an error on Netscape 4.6 (no error with 
>IE, the script gets executed, and its fine, I checked the value of 
>the error in netscape says:
>"can't convert top.location to primitive type."

That's because top.location is an object, not a string. Use 
top.location.href instead, it's already a string.

Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

More information about the thelist mailing list