Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Apr 17th, 2006, 10:07 PM   #21
Writlaus
Hobbyist Programmer
 
Writlaus's Avatar
 
Join Date: Nov 2005
Posts: 149
Rep Power: 3 Writlaus is on a distinguished road
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?
Writlaus is offline   Reply With Quote
Old Apr 18th, 2006, 6:56 AM   #22
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
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
DaWei is offline   Reply With Quote
Old Apr 18th, 2006, 8:27 AM   #23
ChiHappens
Programmer
 
ChiHappens's Avatar
 
Join Date: Sep 2005
Location: Brevard, NC
Posts: 35
Rep Power: 0 ChiHappens is an unknown quantity at this point
Send a message via MSN to ChiHappens
Parse error: parse error in /home/www/logbru1.farvista.net/index.php on line 215
__________________
http://www.starshipcombatsimulator.com
They mostly come at night...mostly.
ChiHappens is offline   Reply With Quote
Old Apr 18th, 2006, 8:36 AM   #24
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
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
DaWei is offline   Reply With Quote
Old Apr 19th, 2006, 1:19 AM   #25
Writlaus
Hobbyist Programmer
 
Writlaus's Avatar
 
Join Date: Nov 2005
Posts: 149
Rep Power: 3 Writlaus is on a distinguished road
But how could an id value work in Mozilla and co. but not IE?
Writlaus is offline   Reply With Quote
Old Apr 19th, 2006, 1:51 AM   #26
Writlaus
Hobbyist Programmer
 
Writlaus's Avatar
 
Join Date: Nov 2005
Posts: 149
Rep Power: 3 Writlaus is on a distinguished road
Ok, nevermind that. The question is, why is Mozilla recognizing document.getElementById() but IE is not?
Writlaus is offline   Reply With Quote
Old Apr 19th, 2006, 5:40 AM   #27
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
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
DaWei is offline   Reply With Quote
Old Apr 20th, 2006, 1:51 AM   #28
Writlaus
Hobbyist Programmer
 
Writlaus's Avatar
 
Join Date: Nov 2005
Posts: 149
Rep Power: 3 Writlaus is on a distinguished road
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.
Writlaus is offline   Reply With Quote
Old Apr 20th, 2006, 6:00 AM   #29
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
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
DaWei is offline   Reply With Quote
Old Apr 20th, 2006, 10:44 PM   #30
Writlaus
Hobbyist Programmer
 
Writlaus's Avatar
 
Join Date: Nov 2005
Posts: 149
Rep Power: 3 Writlaus is on a distinguished road
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.
Writlaus is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 2:58 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC