There are two SUBMIT buttons in a FORM form (such as "Modify" and "Delete") and only one ACTION processing page
How to distinguish whether to deal with "modification" or "delete" in this ACTION page?
Method 1:
If the FORM form looks like this:
<INPUT Type="Submit" Name="Action" value="Modify">
<INPUT Type="Submit" Name="Action" value="Delete">
You can read the value of Request("Action") in ASP. If the user selects "Modify", then this variable is "Modify".
Method 2:
You can make a script function, such as:
<Script Language="javascript">
function modify()
{
document.="";
document.();
}
function delete()
{
document.="";
document.();
}
</Script>
<form name="form1" action="">
<INPUT Type="Button" Name="Modify" value="Modify " onClick="modify()">
<INPUT Type="Button" Name="Delete" value="Delete " onClick="delete()">
</form>
This allows multiple buttons to be sent to different web pages.
How to distinguish whether to deal with "modification" or "delete" in this ACTION page?
Method 1:
If the FORM form looks like this:
<INPUT Type="Submit" Name="Action" value="Modify">
<INPUT Type="Submit" Name="Action" value="Delete">
You can read the value of Request("Action") in ASP. If the user selects "Modify", then this variable is "Modify".
Method 2:
You can make a script function, such as:
<Script Language="javascript">
function modify()
{
document.="";
document.();
}
function delete()
{
document.="";
document.();
}
</Script>
<form name="form1" action="">
<INPUT Type="Button" Name="Modify" value="Modify " onClick="modify()">
<INPUT Type="Button" Name="Delete" value="Delete " onClick="delete()">
</form>
This allows multiple buttons to be sent to different web pages.