I have found that if you want JS to be applied to or run from the loaded page, it is better to account for that outside the page... i.e. I include functions on my normal JS library the dialog may make use of.

It seems that loading Dialogs that include JS (includes or source) is somewhat hit and miss. I've been able to get it sometimes, but not others. So I just avoid the issue now outright and have my main page load the JS libraries, and then trigger from an appropriate event, or before/after I call the dialog.

Kinda nebulous I know, but hope it helped.

Shawn

Tom wrote:
Well I seem to have been able to fix this. Still now 100% sure what
the problem was though!

I originally had some header & footer info in the html page to be
ajaxed into the modal window. I had it set up this way as I ahd hope
dto allow uses with JS disabled to redirect to the page when the Modal
version failed.

I removed this as I was doing some code clean up and now my problem is
fixed.

I assume that some of that code was causing interference on the second
display.

Has anyone any nuggets of knowledge they can share about this
behaviour?

Cheers
Tom

On Feb 22, 3:37 pm, Tom <[EMAIL PROTECTED]> wrote:
Hi

I use the following  function to open modal windows by passing the
correspondingly ID & html url .

function jqmWindow(div_id , page){
     $('div_id).jqm({
            //trigger: '#edit',
            ajax: page,
            target: false,
            modal: true, /* FORCE FOCUS */
            onHide: function(h) {
              h.o.remove(); // remove overlay
              h.w.fadeOut(444); // hide window
            },
            overlay: 10
     }).jqmShow();

}

I use .jqmShow to open the window instead of the trigger which I have
commented out.

The modal window opens and then  I close it again by clicking a button
with class='jqmClose' associated to it.

If I try to open the same modal window a second time it fails to work
and I get this error from firebug.

H[this._jqm] has no properties

jquery.jqModal.js (line 34)

$.fn.jqmShow=function(t){return this.each(function(){if(!
H[this._jqm].a)$.jqm.open(this._jqm,t)});};

What am I doing wrong? I am using version  * $Version: 2007.08.17 +r11

Cheers
Tom

Reply via email to