View Full Version : Determining how a form was submitted

07-06-2005, 02:51 PM

I'm using the onchange attribute of the select tag to display info dynamically depending on the value of another drop down list.
In order to do that, I submit the form when the value is changed, so that I can keep all the other values of the form.

However, I'd like to process the data only if the user clicked the "Submit" button, not if the form was submitted by changing the value of one of the drop down lists.

Any idea how I can know when the submit button has been clicked ?

07-06-2005, 03:30 PM
I would need to see code to help you

07-06-2005, 03:41 PM
you need to add a check to the value of the submit button (obviously the syntax depends on the language you're using)

//process the form


if request.form('submit')<> "" then
'process form

07-06-2005, 03:45 PM
'submit' being the name of the button, I understand ?
I was thinking of this solution, but wasn't sure if the button was considered "set" only if clicked.

07-06-2005, 03:49 PM
yes replace 'submit' with the name of your submit button

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum