On Wed, Jul 2, 2008 at 11:42 PM, Hypolite <[EMAIL PROTECTED]> wrote:
>
>
> I'm still stuck with my jqModal iframe closing problem.
>
> But this time it's the other way I can't figure out.
>
> Here is my HTML/JS code for the parent windows :
>
> <div id="div_modal" class="jqmWindow"><iframe id="iframe"
> src="form.html"></iframe></div>
>
> $().ready(function() {
>  $('#div_modal').jqm(); //Initialization of the modal box
>
>  $('#iframe').contents().find('input').click(function() {
>    $('#div_modal').jqmHide(); //The button inside the iframe must close the
> modal box in the parent
>  })
> });
>
> The documentation says that "contents()" return the HTML document when
> called on an <iframe>, but it returns always "null".
>
> Someone's got an idea ?
>
> Hypolite
> --
> View this message in context: 
> http://www.nabble.com/jqModal---How-to-access-the-parent-window-from-an-iframe--solved--tp18183904s27240p18247490.html
> Sent from the jQuery General Discussion mailing list archive at Nabble.com.
>
>


well, AFAIK the only safe solution is to have the close button in the
same window as the jqModal container. you simply cannot access objects
in the main from the iframe for security reasons i think
.
also, i just wrote a how-to using jqModal with iframes. no help for
your specific issue, but maybe it helps for other things.

You can find it here :
http://www.pixeline.be/blog/2008/javascript-loading-external-urls-in-jqmodal-jquery-plugin/

The final example is here: http://www.pixeline.be/experiments/ThickboxToJqModal/

HTH
-- 
Alexandre Plennevaux
LAb[au]

http://www.lab-au.com

Reply via email to