Any way to override .blur() if .submit() is called upon in jQuery? -


I am writing a custom code for CMS for the website. When a user clicks on the submit button (built with the jQuery UI), it calls the click event on the button, in return for which there is a submission event, which submits the form.

said that the form also shows specific fields to see if they have the text, and the error message and disable the button until suspending submitted issues. To do this, I currently use Focus (), which has a .blur () function inside it, which checks to see if the error has been fixed and if the notice was removed (if it is) And if there are no other errors, the button is reactivated).

Now, I have this issue that if a user checks any area at any time, if they do not press it out and try to submit form data, then The Blur () function takes control (as it is coded), so the form takes another click to submit the data.

Is there any way to do this. Take precedence over submit (). Blur () In JQuery this problem can not occur (for now I just tell the user to do the steps I use)

(If you need a code for people, then I can try posting something about it.)

I tried to remove the blurring event on the input field and use it FocusAut event on the forest faset function This solution works for me.

The other best solution is to set a timer that delivers blur event action before fireing button click event

// namespace var setimer for timer = {timer: Null}

  $ ('Input, select'). Blur (function () {setTimer.timer = setTimeout (function () {functionCall ();}, 1000);}); $ ('Input, Selection'). Focus (function () {setTimer.timer = setTimeout (function () {functionCall ();}, 1000);}); $ ("#BTN"). Click (function () {explicit timed out (setTimer.timer); function call ();});  

Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -