View Single Post
Old 03-15-2007, 11:40 AM   #7 (permalink)
alex-party
Elite Googler
 
alex-party's Avatar
 
Join Date: Oct 2006
Location: Ireland
Posts: 1,085
Thanks: 0
Thanked 2 Times in 2 Posts
alex-party is an unknown quantity at this point
Post

Well, first of all, I can't figure out what you're trying to do with this function.
Do you know yourself what should be happening when you call it?

Well, In the "for" statement, you're using "document.write" which returns javascript string object. And string object has two properties:
* length - The number of characters in the string.
* prototype - For creating more properties

See yourself:
for(x in document.write){
alert('type:'+typeof(x)+',length:'+x.length);
}

Then you're trying again to write string object into browser.
I assume Firefox displays "prototype" as the last property found for this object . And only God knows what's happening with IE......

You should check javascript reference on strings: http://www.javascriptkit.com/jsref/string.shtml
alex-party is offline   Reply With Quote