Avatar of owenparker
owenparker
Flag for Canada asked on

OnChange not firing in IE, but perfect in Firefox - Hielo

I read many casers where this was happeneing but none of the proposed solutions leant themselves to how I was working with it so, alas, a new question on this old topic.  everything is working perfectly in FF but the onchange is doing nada in IE.  Any ideas of how to work around this 'problem' with IE?

check my profile for the test page online...
Web DevelopmentJavaScript

Avatar of undefined
Last Comment
owenparker

8/22/2022 - Mon
aidinet

It is fired but the problem is in your fetchdata or readaStatChanged functions
you can put alert on the fetchdata function to see that it is called when the event fired by IE
aidinet

You have wrong HTML
you put div between <tr>s
you should put tbody instead of div (for the start and end div tags)


// this is wrong HTML
</tr>
<div id="getavailsrvc">
<tr>
 
// use this
</tr>
<tbody id="getavailsrvc">
<tr>

Open in new window

owenparker

ASKER
Now I qam even more stumped.  Made the tbody change.  Put an alert in statechanged and sure enough it is firing and returning response properly in IE.  Still works perfectly in FF.  Hmmmm...
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
owenparker

ASKER
I'm actually getting a script error in IE now.  Problem is, I don't know how to see the rrro in IE.  I use FF when debugginh/troubleshooting and of course, the error doesn;t even happen in FF.  How to I trap errors, reveal them in IE.  Is there something I can turn on or something along the lines of Firebug in FF?
owenparker

ASKER
Ok, got debugging turned on in IE.  In IE this line:

 document.getElementById(data[i].targetDiv).innerHTML = data[i].html;

is causing the rror.  In FF, nada.  What gives?
ASKER CERTIFIED SOLUTION
aidinet

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
owenparker

ASKER
Reading that article really helped it make sense aidinet.  Thanx.  Always best to understand the why before figuring the how.  It's all working great now and I think I conquered yet another 'situation' I was bound to come up against again someday soon.

Thanx for hangin' around long enough to help me 'see the light'

Owen
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.