iFrames, Javascript events and IE problems

Author - Webner
8.03.2015
|
0 Comments
|

Several hours wasted while debugging this. We have a, HTML page and within this page is a hyperlink to open another page in iFrame. While iFrame page is loaded we display WAIT message overlay on parent page so as to make that inaccessible. So wait message overlay is behind iFrame and above the parent.

iFrame page was loading without any problem in FF, Chrome and IE. Problem happened with event handlers associated with textboxes on iFrame page. We have textboxes on iFrame page and “onchange” event handler is tied to each textbox. In FF and Chrome event handlers were working perfectly. But IE was showing very strange behavior. Onchange event was not fired when value was changed in textbox and focus was removed from it. It was being fired second time when I was bringing focus back into same textbox. That means  IE was confusing onclick with onchange. I tested onblur and it was same problem. Onblur was being fired “onfocus”.

After spending so much time I finally figured out that problem was because Wait message overlay had “modal=true” set. Although Wait message was being shown behind the iFrame window by browser still this property was interfering with proper event handling by IE. When I changed Modal to false it started to behave as expected.

Webner Solutions is a Software Development company focused on developing Insurance Agency Management Systems, Learning Management Systems and Salesforce apps. Contact us at dev@webners.com for your Insurance, eLearning and Salesforce applications.

Leave a Reply

Your email address will not be published. Required fields are marked *