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 8950155
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T13:23:18+00:00 2026-06-15T13:23:18+00:00

This is my login form code. But the form submit and JSON response retrieval

  • 0

This is my login form code. But the form submit and JSON response retrieval isn’t happening at all. Where am I going wrong?

<html>
    <body>
        <script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.2.6.min.js">
        </script>
        <div id="login-box">
            <form id="login" method="post" class="login" action="http://localhost:3000/login/">
                <fieldset class="textbox">
                    <label class="username"> <span>Username or email</span>
                        <input id="username" name="username" value=""
                        type="text" autocomplete="on" placeholder="Username">
                    </label>
                    <label class="password"> <span>Password</span>
                        <input id="password" name="password" value="" type="password"
                        placeholder="Password">
                    </label>
                    <button class="submit button" type="button">Sign in</button>
                    <p>
                        <a class="forgot" href="#">Forgot your password?</a>
                    </p>
                </fieldset>
            </form>
        </div>
        <button id='theButton'>What?</button>
        <script>
            jQuery(document).ready(function () {
                jQuery('.login').submit(function () {
                    $.ajax({
                        url: $(this).attr('action'),
                        type: $(this).attr('method'),
                        data: $(this).serialize(),
                        success: function (response) {
                            alert(response);
                        }
                    });
                    return false;
                });
            });
        </script>
    </body>
</html>
  • 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-06-15T13:23:19+00:00Added an answer on June 15, 2026 at 1:23 pm

    Change the button type from “button” to “submit”

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been making this login form in C# and I wanted to 'submit' all
I am using this tutorial to create a login form http://www.ryancoughlin.com/2008/11/04/use-jquery-to-submit-form/ It authenticates against
I have code of Jquery login control loke following using this into asp.net but
Can somebody explain to me where I'm going wrong with this login setup? I've
I'm using this code: $j(#register-form form).submit(function() { if ($j(input:first).val() == correct) { $j(#registration-notification).animate({ height:
I have this login form. This form is a grouped table view where the
I have a login form for my website. This login form have two text
My login form is located at /account/login . GET requests to this URL cause
I got this from for a login form tutorial: function sanitize($securitystring) { $securitystring =
I've been reading this post Creating a login form in CodeIgniter based on Ion

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.