Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7432665
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T09:29:36+00:00 2026-05-29T09:29:36+00:00

I have a page with login form (on click, login form slides dowm) and

  • 0

I have a page with login form (on click, login form slides dowm) and underneath I have a link for registering a new user. With click on ‘register new’ link, new form pops-up and after validating each field, the submit event doesn’t work – because there is a login form too and jQuery tries to trigger submit event of the first form.

How to trigger this specific onsubmit event – for the second form? I tried to hide a first form, but it didn’t work and then I try to disabled it, which doesn’t work as well.
(forms on separate pages works fine – validated with PHP and JS)

I think this is an easy thing to do .. but I cannot figure out how to do. Till now I overcome this problem, but I really like to find out how to make it work.

Thanks.

Unfortunatelly .. none of this answers works …
Here is the code:

<div id="loginFormContainer">
<h2 id="loginShow" class="myriad_pro_bold_condensed_italic">Login</h2>    
<form name="login_form" action="<?php if(isset($action) && !empty($action)) echo $action; ?>" method="POST" id="login_form" >
    <fieldset>
        <label>Your name </label>
        <input type="text" name="username" maxlength="30" id="username_login" value="" class="required" placeholder="Enter Your Name" />
        <label>Your password </label>
        <input type="password" name="password" maxlength="16" id="password_login" value="" class="required " placeholder="Enter Your Password" />
    </fieldset>
    <input type="hidden" name="token" value="<?php if(isset($token)) echo $token; ?>" />
    <input type="submit" name="submit-login" id="submit_login" value="Login" />
</form>
    <div class="small"><a href="register.php" id="register">Register</a> | <a href="password-new.php" id="new-password">Forgotten Password</a></div>
    <div class="error"></div>
</div>

And JS … should work like: if on register click: register windows pops-up, if on login the login form should slide down.
Right now, both of them slides …I can remove the login form if I want to register, but the submit button from register form doesn’t work.

 $("#login_form").hide();
    $("#loginShow").click(function(){


        $('form#login_form .error').remove();
        $("#login_form").slideDown("slow");

        $('form#login_form').on("submit", function(event) {

            event.preventDefault();
            //code validation and ajax submit
        }); //end form submit

    });    

    $('#register').click(function(e) {
        //$('#loginShow').remove(); //form is removed, but submit event still doesn't work
        //if I completely remove login form from php page, then works fine

        e.preventDefault();

        $('form#register_form').click(function(event) {
            event.preventDefault();
            //

        }); //end form submit

    });//end register floating

Oh, yes, one final detail: on Chrome works fine :S, not in FF (v.10)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T09:29:37+00:00Added an answer on May 29, 2026 at 9:29 am
    $(":submit").click(function(e){
      $(this).closest("form").submit();
      return false;
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a child page LoginContent.aspx which contains a login form. If the user
I have a link on my page, which calls a login form inside Fancybox.
I have this situation: There are a login page with a login form (form
I have a login form, which needs to be re-directed to the main page
it should submit form, :driver => :webkit do visit '/things/new' page.should have_content('Login') fill_in 'user_login',
I have a Login page that captures User input like this. MD5calc ss =
I have a login page. When the user enters valid Username and Password another
I have a simple login form, username and password. Basically, When a user is
I have a form that slides down on click signin and slides up on
I have a site with a login form. When the login form page is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.