Thursday, September 01, 2005

Form With Two Buttons

I'm trying to create a javascript to handle a form with 2 buttons... each button should do something different.

In the HEAD Section of the form:
<script>
function doSubmit(actionPage)
{
document.theForm.action=actionPage
document.theForm.submit()
}
</script>

In the BODY of the form:
<input type="button" value="EDIT" onclick="doSubmit('edit.cfm')">
<input type="button" value="SUBMIT" onclick="doSubmit('submit.cfm')">

0 Comments:

Post a Comment

<< Home