0

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 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

Chris Cummings
  • 1,538
  • 2
  • 24
  • 39
  • I have updated the post with the code...note that the close function in there is called from a standard "X" close in the modal window and it does work correctly. That code reloads the page below. – Chris Cummings Jul 05 '11 at 14:12

1 Answers1

0

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

Community
  • 1
  • 1
Chris Cummings
  • 1,538
  • 2
  • 24
  • 39