tags:

views:

180

answers:

1

Hello,

I have this iframe that resides under a jquery-ui-dialog and inside this iframe is a link that redirects to another page when clicked through jQuery, however, the iframe gets redirected alright but not the entire parent page.

parentpage.aspx

<script type="text/javascript">
    $(document).ready(function () {
        $("#form-dialog").dialog({
            autoOpen: true,
            modal: true,
            width: 200,
            draggable: true,
            resizable: true
        });
    });
</script>
<div id="form-dialog" title="Image Upload">    
            <iframe src="/imageupload.aspx">
            </iframe>
</div>

imageupload.aspx

<script type="text/javascript">
$(document).ready(function () {
    $("#btnDone").click(function () {
        window.location = "http://localhost/uploadcomplete.aspx"
    });
});
</script>
<a href="#" id="btnDone">Redirect</a>

thank you for your help. -imperialx

A: 

Have you tried window.parent.location?

edl
Thanks! You saved my life.