Open GoogleCodeExporter opened 9 years ago
I second that. Although my browser (IE9) is not crashing, what I'm experiencing
sounds the same.
I have a page with jquery 1.6.3 and the latest simple modal script (1.4.1).
My modal 'call' looks like:
$.modal('<iframe src="BookDetails.aspx?id=' + id + '" height="' + winHeight +
'" width="' + winWidth + '" frameborder="0" style="border: 0px;">', {
containerCss: { height: winHeight, width: winWidth },
zIndex: 10100,
onClose: closeDetails
});
Which opens up the modal window just fine.
However, BookDetails.aspx does not contain a jquery reference, or any jquery
reference for that matter. When I try to add the jquery reference I get a
SCRIPT5009 javascript error. Most of the time it will say that 'Object is not
defined' or 'Array is not defined'. The strange thing is that this will only
happen when using IE9. It works fine under Chrome and Firefox.
It's fairly easy to try for yourself. Just open the Iframe demo you have on
your own website (http://www.ericmmartin.com/projects/simplemodal/) and try the
demo to open an external page in IE9...
Any thoughts?
Original comment by j.kokenb...@gmail.com
on 8 Sep 2011 at 8:00
[deleted comment]
I had the same issue too.... i think this issue is more to do with how IE9
handles iframe and subsequent loading of javascript in it... my workaround was
to set iframe src only 'onShow' callback function and somehow i stopped getting
those object undefined errors. Hope this helps.
function onShow(){
jQuery("iframe").attr("src", "/goto/site");
}
Original comment by dev.zav...@gmail.com
on 12 Sep 2011 at 11:56
upgraded to the latest version of jQuery (1.6.3) and the cursor just keeps
spinning even though user is 'logged in'. same error using IE8 and latest
Firefox on Mac. so i reverted to jQuery 1.4.2 and the problem is fixed.
Original comment by rudynik...@gmail.com
on 14 Sep 2011 at 9:46
It has been a while, but I thought I should post an update here.
I found that the solution provided by dev.zav (comment #3) solved my issue as
well.
In stead of setting the src attribute directly in the iframe, I now set it
during the 'onShow' event. I no longer receive 'weird' JavaScript errors...
Thanks for the suggestion!
Original comment by j.kokenb...@gmail.com
on 15 Oct 2011 at 7:40
[deleted comment]
[deleted comment]
I can confirm that dev.zav's comment #3 solved my issue too. My code ended up
looking something like this:
$('.trigger-submodal').click(function (e) {
e.preventDefault();
function setSrc(){
$('#iframeid').attr("src", "iframepage.php");
}
$.modal('<iframe src="" id="iframeid" frameborder="0">', {
onShow: function(dialog) {
setSrc();
}
});
});
Thanks guys!
Original comment by jaydedli...@gmail.com
on 21 Oct 2011 at 5:49
Original issue reported on code.google.com by
punkrat...@gmail.com
on 30 Aug 2011 at 1:24