View Full Version : JQModal Inline display and AJAX display conflicts

07-13-2010, 03:19 PM

I am using JQModal on an ASP.Net page in two different modes. For some of the modals, I am displaying Inline content from the page. For other modals, I am using the AJAX attribute on JQModal to display content from an external page. I am finding that these two modes seem to be conflicting with one another. For instance, if I open an AJAX modal on the page, perform some actions and close, and then go open one of the Inline modals on the page, perform some actions and then attempt to close, I am getting wierd JQuery/JQModal javascript errors such as the following:

Microsoft JScript runtime error: 'a' is null or not an object


Microsoft JScript runtime error: 'h' is null or not an object

If while I am on the page I use the inline modals exclusively, everything works fine. But as soon as I open and close one of the AJAX modals, I start seeing scripting errors thrown from operations in the Inline modals that normally work. It is like something is getting re-wired when the AJAX modals are opened and I have yet to grasp what is going on and how to remedy it.

All of my modals are getting wired up in code-behind before the page is rendered. The following are excerps of code that wire the inline modals followed by code that wires the AJAX modals:


.jqm({ modal: true ,
onHide: function(hash) {
hash.w.fadeOut("fast",function() { if(hash.o) {hash.o.remove();} });


.jqm({ modal: true, ajax: '@href', ajaxText: 'Please Wait...', trigger: 'a.digitalTrigger',
onHide: UpdateParentState});

As another more concrete example, if I open an inline modal that executes a jqmHide against that modal $('#modInline-' + itemNumber).jqmHide() all is well until I open an AJAX modal. If I open an AJAX modal, close, open the Inline modal, this same line of code that worked before will throw the error: Microsoft JScript runtime error: 'a' is null or not an object.

Has anyone else experienced this or might know what is happening and how to address?

Thanks in advance

07-14-2010, 02:35 PM
This turned out to be something rather stupid, of course. I was including the JQuery and JQModal libraries on the AJAX page displayed in the modal and they were conflicting with the libraries on the parent page.