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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T08:53:41+00:00 2026-06-18T08:53:41+00:00

The is that i get an error the the click event is used. The

  • 0

The is that i get an error the the click event is used. The Ajax call is “cancelled” before the server side code has finish. Then i do an debugger at the $Ajax error method, the statusText is just saying statusText: "error". I found an temporary solution by removing the <form id="formid">.... <form/>. But since i’m using jQuery.ValidationEnginen which can only be used on a .

The jQuery code:

$("#formid").validationEngine('attach', { scroll: false }).css({ color: "#4a6b0e" });

    $('#submitLogin').click(function () {
          var self = this;
            var UserName = $("#UserName").val();
            var Password = $("#Password").val();
            var RememberMe = $("#RememberMe").val();
            var PropertyId = ol.property.infoId;
            $.ajax({
                type: "POST",
                url: ol.url("~/Authentication/LogIn"),
                data: { "UserName": UserName, "Password": Password, "RememberMe": RememberMe },
                success: function (data) {

                  if (data.Errormes) {
                    $("#Result").html("Error: " + data.Errormes);
                  } else {
                    window.location.reload();
                  }
                },
                error: function (data, arg1, arg2, arg3) {
                  alert("Error: Run for your life!!");
                }
            });
        });

The form:

<form id="formid">
            <div class="LeftCol">Brugernavn</div>
            <div class="RightCol">
                <input type="text" style="width: 250px" id="UserName" name="UserName" class="validate[required,custom[email]]">
            </div>
            <div class="LeftCol">Adgangskode</div>
            <div class="RightCol">
                <input type="password" style="width: 250px" id="Password" name="Password" class="validate[required]" />
            </div>
            <div class="LeftCol">Husk mig?</div>
            <div class="RightCol">
                <input data-val="true" data-val-required="The Remember me? field is required." id="RememberMe" name="RememberMe" type="checkbox" value="true">
            </div>
                <br><div class="RightCol" id="Result" style="color:red;"></div><br>
        <input id="submitLogin" type="submit" value="Log in" class="oline-button-green white" />
 </form>
  • 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-18T08:53:42+00:00Added an answer on June 18, 2026 at 8:53 am

    Try to add this :

     $('#submitLogin').click(function (e) {
        e.preventDefault();
       // ...
     });
    

    Since you bind a click event to a submit button, your ajax request is being sent asynchronously and the form is also being sent which is causing the page to reload and the ajax request to be cancelled.

    To avoid the form to be submitted when you click on the submit button, you’ll have to prevent the submit button from its default behaviour by using e.preventDefault();

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

Sidebar

Related Questions

How do I unit test my code that has LTS Datacontext. I get error
I get that error with the following code. anyone know why? function validateAdminInput(){ var
I have a piece of code of my application that's I get the error
When I try to do that I get the error Changed to 64-bit applications
I see that many people get this error, but their situations all appear a
I have a website that I get the below error on whenever I navigate
I get an error that says Parse error: syntax error, unexpected T_PRIVATE in E:\PortableApps\xampp\htdocs\SN\AC\ACclass.php
Please help with the following error that I get with Spring Security 3.05 and
Here is the complete error message that I get in the Package Manager Console
I'm trying to free memory that's reallocated but I get an error... float *

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.