Is it possible to make an ASP-page sense which submit button was used to submit form?
I have a stateic web page with a form on. The form can be submitted in either of two ways.
1. By the Java Script function "document.form.submit()". This function is called everytime changes are made in the form.
2. When the user manually clicks the submit button present in form.
I want the ASP page to treat the form differently depending on which submit procedure was used.
Is it possible to achieve that?
If so how?
Could I for example assign an argument to each submit procedure which could be retrieved in the ASP page and thereby used to identify which procedure was used? If so, how?
document.getElementByID('hdnButtonPressed').value = "false";
<input type="hidden" name="buttonPressed" id="hdnButtonPressed" value="true" />
If you do name your button "submit", your form will have a button-object ellement named submit. The form cannot have a submit() method and any other object of the same name ... I once spent hours trying to figure out why this was happening in some code we had inherited. Only to have to go through it again a few months later because I didn't document it and tell all my associates about it the first time we ran into it.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)