Jump to content

Submit button events


amavadia

Recommended Posts

I have a form on my page with various elements and have created a seperate validate php page. At the bottom of my form I have a button (type="button"). When it is clicked, the data is posted to the validate page, and errors returned. If errors are returned it displays them, if not I want it to post and redirect to another page like a normal form. The problem I have is when I use a type="button" button, the first part works fine but obviously it does not post and redirect because it is not a submit button, but if I change the button type to submit, the .click() handler on the button does not seem to be firing and so the page is posted even without checking for errors.

 

Should i be using a different handler on the submit button as opposed to a button button?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.