View Full Version : Help!...onclick listener isn't working correctly?...any ideas?

10-09-2015, 10:57 PM
Greetings, Oct 9th, 2015

Curiously, I have been attempting to re-vamp a javascript spell check to load into a div rather than the traditional browser popup dialog which has the "Input form buttons" in a form tag that is set up with listeners of the old document.getElementById('thebutton').onclick rather than the addEvent type listeners! The spell check work fine in the browser dialog popup in both MSIE and FF, however, when switching all over to the div element rather than the popup all works fine in MSIE! Firefox however loads everything fine and the functions loads suggested words etc fine! However, upon selecting a suggested word the word is successfully surrounded by a red border but upon pressing the "Change" button nothing occurs, not even an error in the console? I have set breakpoints everywhere and have determined the "Button Listener" simply isn't catching the click event? I have attempted to alter the location references as well as addressed with "parent.document.getElementById('thebutton').onclick" or "parent.document.body.document.getElementById('thebutton').onclick"! I have tried countless other avenues...any ideas?


10-10-2015, 05:42 AM
Looks like you've forgotten the code, although a reduced demo page would be more useful so that we can see the problem firsthand. (Just the pertinent scripts, markup and CSS)