开发者

jQuery UI Dialog with iFrame, link to reload parent

开发者 https://www.devze.com 2023-03-17 05:51 出处:网络
I have a page that loads a jQuery UI Dialog with an iFrame in it. This iFrame has a login form, however I want a link in this iFrame that says \"click here if you are a member\" that they can click th

I have a page that loads a jQuery UI Dialog with an iFrame in it. This iFrame has a login form, however I want a link in this iFrame that says "click here if you are a member" that they can click that will redirect the PARENT to a different page (and thereby close the modal).

Right now any links开发者_Python百科 in the modal (and so in the iFrame) just redirects the iFrame)

Here is the code that calls the modal with the iFrame in it:

$(document).ready(function() {
$("#modalIframeId").attr("src","http://site.com/wordpress/register-now/?the_email_address=<?php echo $the_email_address; ?>");
$("#divId").dialog({
       autoOpen: true,
       modal: true,
       closeOnEscape: true, 
       draggable: false,
       resizable: false,
       dialogClass: 'no-close',
       height: 570,
       width: 500,
       title: 'Sign Up',
       close: function(event, ui) { window.location.href = window.location.pathname; }
   });
});

This is all within a Wordpress framework and the page that is called above has the form in it (that works) and the is where a need to have a link to redirect the parent to another page.

Any thoughts? Thanks! Chris


I guess sometimes the old=school "lo-tech" way is the one we often forget. Found this thread: Stack Overflow Which reminded me that target="_top" would do what I needed...and it did. Tested in FF and Android and works well in both (wider testing expected to work well too).

Thanks

0

精彩评论

暂无评论...
验证码 换一张
取 消