This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Excuse the horrible aoData.push code there at the end. I'm still working on a plugin to collect form input fields and convert them to an object format that datatables will accept as the aoData parameter.
This just gets weirder. Still, working fine in FF, fails in IE. What I'm getting now is a change event when clicking anywhere on the page, but only once. Here's the html as generated by the jsp page.
Choosing an option from the select list inserts a html fragment. If the first option is chosen, this is the html inserted:
Now at this point I can click anywhere on the page and get a change event shown by the alert box on line four of the following external js file, but only once. After that I can select my parameters and run the query and not get another change event unless I select a new option from the initial select box.
Any ideas on this one? It's driving me crazy...How is a change event getting bound to the entire document?!? Freakin' IE gives me more gray hair everyday.
Hopefully, by tomorrow, I'll either have this conquered or I'll have a small app that replicates the same problem.
Bear Bibeault wrote:Within an event handler, that line of code will find any element that is a child of the event target that has the attribute value="choose", and will then remove it.
In jQIA it is used to remove the "choose one" option from a select element once something has been explicitly selected from that select.
That's how I was using it; to remove the "Please Choose an Option" entry from the select box. But it appears that removing that entry was detected by IE as a change event that was left "hanging" out there until a click anywhere on the page triggered the event. It seems to be related to the fact that I was running it within the "success" function of an ajax call. I moved that line of code to immediately follow the change event like this and now all is well. Lesson learned.