jQuery Form Submit fails?

Cheeky Jquery fails to auto submit forms sometimes and this is due to the submit button interferring with the .submit(). call.

I found this out when creating an autologin feature for a client. They needed to get username details from clients on their own website, check for authenticity and then if OK create an autologin token and redirect to the suppliers website via a post form.

Everything was going OK until the point of automatic form submission when it failed with the error Property 'submit' of object # is not a function.

This was the JQuery

and the HTML:

but apparently according to Jason on StackExchange:

and what a result, changed the HTML and it works:

About CDB 362 Articles
Self-Employed Software Developer, Spark, Property Management, Hobby Forestry, Ex-Teacher, Engineering - Wood, Metal, Electrics & Computers. Outdoors - Walk, Cycle, Kitesurf,

Be the first to comment

Leave a Reply

Your email address will not be published.


*


This site uses Akismet to reduce spam. Learn how your comment data is processed.