MonoX support board

Start the conversation, ask questions and share tips and solutions with fellow developers.

Non-registered users can only browse through our support boards. Please register now if you want to post your questions. It takes a second and it is completely free. Alternatively, you can log in without registration using your credentials at major sites such as Google, Microsoft Live, OpenId, Facebook, LinkedIn or Yahoo.

NEED HELP WHEN LOGIN PAGE IS IN IFRAME  (Mono Support )

Viewed 10104 time(s), 3 post(s) 11/13/2013 9:47:23 AMby sonap
sonap

sonap

11/13/2013 9:47:23 AM
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


This content has not been rated yet. 
475 Reputation 52 Total posts
sonap

sonap

11/13/2013 11:55:43 AM
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;                
}
This content has not been rated yet. 
475 Reputation 52 Total posts
khorvat

khorvat

11/13/2013 1:26:01 PM
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
This content has not been rated yet. 
15993 Reputation 2214 Total posts