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 )

13582 put(a) pogledan, 3 odgovor(a) 13.11.2013. 9:47:23Kreirao(la) sonap
sonap

sonap

13.11.2013. 9:47:23
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


Ovaj sadržaj još nije ocijenjen. 
475 Reputacija 52 Ukupno objava
sonap

sonap

13.11.2013. 11:55:43
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;                
}
Ovaj sadržaj još nije ocijenjen. 
475 Reputacija 52 Ukupno objava
khorvat

khorvat

13.11.2013. 13:26:01
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
Ovaj sadržaj još nije ocijenjen. 
15993 Reputacija 2214 Ukupno objava