http://mysite.verizon.net/res8szeo/reader has three javascript errors in text files and I just can't figure out why.
http://mysite.verizon.net/res8szeo/reader has three javascript errors in text files and I just can't figure out why.
What do you do with responseText then??
what do you mean?
I split it. then I put it in an array.
then I search the array
but the errors are in the text files themselves. (I am using firefox)
Opera tells a different story:Code:JavaScript - http://mysite.verizon.net/res8szeo/reader/ Inline script thread Error: name: TypeError message: Statement on line 15: Could not convert undefined or null to object Backtrace: Line 15 of linked script http://mysite.verizon.net/res8szeo/reader/reader.js while (! (words[i].indexOf(currentword.innerHTML + " ") === 0)) Line 6 of inline#1 script in http://mysite.verizon.net/res8szeo/reader/ definecurrentword();That should be:Code:while(!(words[i].indexOf(currentword.innerHTML+" ") === 0)) { i++; if(i===words.length)break; }Even better, use a for loop:Code:while(!(words[i].indexOf(currentword.innerHTML+" ") === 0)) { i++; if(i===words.length-1)break; }Code:for(var i = 0; i < words.length && words[i].indexOf(currentword.innerHTML.toString() + " ") !== 0; ++i) {}
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
I made some changes. It would apeare that the getellementbyid function is returning null for some reason. so as you can see, I played around with that a bit, with no luck though. now I am really confuses, because opera is giving me errors in commented out code.
Bookmarks