ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Add target="_top" to LOGIN FORM

November 08, 2011 7:24am

Subscribe [2]
  • #1 / Nov 08, 2011 7:24am

    Narthex

    83 posts

    To get my login form and registration form on one page I had to call the login form in an iframe.  Unfortunately, this means that when people login they are directed to the home page within the iframe, not within the whole page.

    This is easily fixed by putting target=“_top” in the form declaration, except that there is no option I’m aware of to do this.

    So the question is: How do I add target=“_top” to the form declaration for login?

  • #2 / Nov 08, 2011 7:26am

    Narthex

    83 posts

    Oh!  I submitted the question in similar form on stackoverflow.com and here’s a quick jquery fix (below).  Add this jquery script (not scrApt) after the closing tag of the form.  Note, you need to be calling jquery, of course.


    <scrapt type=“text/javascript”>
    $(function() {
    $("#member_login_form").attr('target', '_top');
    });
    </scrapt>

  • #3 / Nov 08, 2011 8:15am

    Sue Crocker

    26054 posts

    Hi, Narthex.

    Glad you found a solution. Feel free to start a new thread if you have any more questions.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases