#include "SaRnHtml.h"
int SaIsSubmitName(char* name);
SubmitName
, has a value of the Argument Name.
SubmitName
. The test returns "1" if a Form Submit Element with SubmitName
has a value of the Argument name. Note that in the example below, the form submit elements all have the name SubmitName
. This function would not be useful unless the Form Submit Element and Argument name matched. If you test by this method, you will have to use SaGetInputValue
and do string compares.
Given the following HTML fragments from a form:
<INPUT TYPE="submit" NAME="SubmitName" VALUE="Insert">
<INPUT TYPE="submit" NAME="SubmitName" VALUE="Update">
<INPUT TYPE="submit" NAME="SubmitName" VALUE="Delete">
The following code will determine which submit button was pressed.
if(SaIsSubmitName("Insert"))
{
/*** do insert ***/
}
if(SaIsSubmitName("Update"))
{
/*** do update***/
}
if(SaIsSubmitName("Delete"))
{
/*** do delete***/
}