Hi pembo, I've had a quick play around with this and here's what I've got so far: -------------------------------------- <a href="javascript:void(0);" onClick="showDialog();">Show Dialog 1 - IFrame doesn't refresh if you don't the 2nd dialog!</a> <br /><br /> <a href="javascript:void(0);" onClick="showDialog2();">Show Dialog 2 - IFrame refreshes every time</a>
<script type="text/javascript" language="javascript"> function showDialog(){ if ($('#dialog1').size() > 0){ $('#dialog1').dialog('open'); } else { var html = '<div id="dialog1" title="Same IFrame"><iframe src="mIframe.php" ></iframe></div>'; $(html).dialog(); } } function showDialog2(){ var html2 = '<div id="dialog2" title="IFrame Refreshes Each Time"><iframe src="mIframe2.php"></iframe></div>'; $(html2).dialog(); } </script> -------------------------------------- mIframe.php & mIframe2.php are simply returning a current timestamp for testing. Clicking the first link loads the dialog. Close it & click the first link again -> the iframe doesn't reload....however if you click the second link at any stage then the first link again the iframe does reload (in FF) Searching further I think this article makes for interesting reading: http://www.extjs.com/forum/showthread.php?t=31461 - seems to be OK from my test in IE (I'm used to IE bugs but not FF!) Hope this helps.... Cheers, Gus On Thu, Jan 14, 2010 at 1:24 PM, pembo13 <pemb...@gmail.com> wrote: > I am using the UI Dialog with an <iframe> within it, the problem is > that the <iframe> gets reloaded every time i ('open') the dialog, even > though i only set the <iframe>.src the first time. That is every time > i do dialog.('open') the iframe gets loaded, I want it to only load > the iframe on the first ('open') invocation. > > -- > You received this message because you are subscribed to the Google Groups > "jQuery UI" group. > To post to this group, send email to jquery...@googlegroups.com. > To unsubscribe from this group, send email to > jquery-ui+unsubscr...@googlegroups.com<jquery-ui%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/jquery-ui?hl=en. > > > >--
You received this message because you are subscribed to the Google Groups "jQuery UI" group.
To post to this group, send email to jquery...@googlegroups.com.
To unsubscribe from this group, send email to jquery-ui+unsubscr...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jquery-ui?hl=en.