Mono Support NEED HELP WHEN LOGIN PAGE IS IN IFRAME 

Viewed 13045 time(s), 3 post(s), 11/13/2013 9:47:23 AM - by sonap
11/13/2013 9:47:23 AM
475 Reputation 52 Total posts

Hello, I call my login page inside a fancybox iframe after clicking the Login button.
When I hit the (submit) Login asp button (<MonoX:StyledButton ID="Login" CommandName="Login" CssClass="main-button submit-btn" runat="server" Text='<%# MonoSoftware.MonoX.Resources.DefaultResources.Login_Login %>' ValidationGroup="Login"></MonoX:StyledButton>) I get redirected to the Default.aspx though inside the iframe.

It seems that I need to make my parent page to be reloaded (redirected) not the iframed page.
Here I have a solution http://stackoverflow.com/questions/5018975/how-to-open-the-redirected-page-from-iframe-to-open-in-the-parent-window-in-asp

Could you please, tell me what to change and where on my files?

Thank you in advance,
Panos


1
11/13/2013 11:55:43 AM
475 Reputation 52 Total posts

We found a solution for those interested:

1. we add a fancybox js code for the fancybox to close when the person is logged in (that is we ad the code in the MembershipNavigation.ascx control):

<script type="text/javascript">
        parent.$.fancybox.close();
</script>
2. we add a code to reload parent page (the page that displays the Iframe in the fancybox declaration:
<!--/Load fancybox-->
    <script type="text/javascript">
     
        $(document).ready(function() {
            $(".various").fancybox({
                maxWidth    : 800,
                maxHeight   : 600,
                fitToView   : false,
                autoSize    : true,
                closeClick  : false,
                openEffect  : 'none',
                closeEffect : 'none',
                padding : 0,
                afterClose : function() {
                    location.reload();
                    return;
                }
            });
        });
    </script>
it is the fragment: 
afterClose : function() {
      location.reload();                   
return;                
}

2
11/13/2013 1:26:01 PM
15993 Reputation 2214 Total posts

Hi,

yes iframe isn't solution here, so you will have to use a solution like the one you have just provided. 

Let us know if you need further help with this.

Regards

3
This is a demo site for MonoX. Please visit Mono Software for more info.