0

I have a web form and need to do some ajax checking before submit. the code is fine if it pass the validation. However, it just keep loading and loading if it fail th validation.

it seems something conflict but I don't know how to chase the problem. Do anyone have similar case that I can find out which part goes wrong?

I tried to use jquery validate, and onsubmit().. return false.. still not work. even I just do the following:

        $("#form").submit(function(e) {
            alert("return false");
            return false;
        })

it's expected that the form didn't submit and do nothing with my form, but it just keep loading..

the mouse cursior just "keep loading" and whatever I press, no reaction come out

Erez Lieberman
  • 1,893
  • 23
  • 31
Joe Yeung
  • 21
  • 1
  • 5
  • can you please pass the code which you have tried – NPE Jan 17 '19 at 09:57
  • So is your question about why you have loading after submit form(give us your html and javascript then)? Or how you can prevent form default sumbit? In that case check https://stackoverflow.com/questions/3569072/jquery-cancel-form-submit-using-return-false – maximelian1986 Jan 17 '19 at 09:58
  • the `return false` will be executed after you confirmed the alert, should mean: never use alert to debug things as it stops execution. use console.log instead – john Smith Jan 17 '19 at 10:50
  • I tried to use chrome and found it stopped somewhere in jquery.min.js. – Joe Yeung Jan 17 '19 at 11:26

1 Answers1

0

i try to use the latest version jquery the problem fixed.

thanks all.

Joe Yeung
  • 21
  • 1
  • 5