![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#21 |
|
Hobbyist Programmer
Join Date: Nov 2005
Posts: 149
Rep Power: 3
![]() |
Yes, I know I should probably do something like write it all in html and overwrite it in Javascript, so javascript handles it if it can, and html does otherwise. I'm going to do that a bit later.
But right now I'm trying to figure out why my Javascript will work in anything other than Internet Explorer. Is it just sloppy coding somewhere? |
|
|
|
|
|
#22 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
That's a lot of code to just dig into. Have you used debug techniques such as firing off an alert box when code takes one path versus another? Monitored the state changes for the http/xml request? Viewed the output of the Javascript console? Generally speaking, the more information you can scrape together, the better. Use binary search techniques: look at things halfway between the beginning and the end, work in the direction of failure, jumping halfway each time. Divide and Konqueror, so to speak. Or IE.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#23 |
|
Programmer
|
Parse error: parse error in /home/www/logbru1.farvista.net/index.php on line 215
|
|
|
|
|
|
#24 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Hmmmm, I don't get a parse error. With IE I get a message stating that the object does not support the operation (a document.getElementById operation). I didn't trace it out to find out what the guilty "id" value was.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#25 |
|
Hobbyist Programmer
Join Date: Nov 2005
Posts: 149
Rep Power: 3
![]() |
But how could an id value work in Mozilla and co. but not IE?
|
|
|
|
|
|
#26 |
|
Hobbyist Programmer
Join Date: Nov 2005
Posts: 149
Rep Power: 3
![]() |
Ok, nevermind that. The question is, why is Mozilla recognizing document.getElementById() but IE is not?
|
|
|
|
|
|
#27 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
getElementById works in IE. Are you sure you have a unique ID? Which particular part of your code is failing, or is every call to getElementById?
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#28 |
|
Hobbyist Programmer
Join Date: Nov 2005
Posts: 149
Rep Power: 3
![]() |
It's the first call made to getElementById that fails. Which probably means that for some reason, IE is not recognizing document.getElementById the function. It has to be something with my code, as my IE will work with other javascript scripts that use that call on other pages. But I cannot for the life of me figure out what I've done wrong, what in my code could make document.getElementById not work.
|
|
|
|
|
|
#29 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Might I ask if you have IE set to flag you when script errors occur?
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#30 |
|
Hobbyist Programmer
Join Date: Nov 2005
Posts: 149
Rep Power: 3
![]() |
I do. All it says is "Object doesn't support this action.", on the line and char where document.getElementById is first called.
I am completely stumped. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|