Adjusting a Server Submission Action : Form Submit « Form Control « JavaScript DHTML

Adjusting a Server Submission Action



<title>Checkbox Submission</title> 
<script type="text/javascript"> 
function setAction(form) { 
    if (form.checkThis.checked) { 
        form.action = form.checkThis.value; 
    } else { 
        form.action = "file://primaryURL"; 
    return true; 
<form method="POST" action=""> 
<input type="checkbox" name="checkThis" value="file://alternateURL" />Use alternate 
<input type="submit" name="boxChecker" onclick="return setAction(this.form)"/>


Related examples in the same category

1.Form Submit action
2.Return the method used when sending form data
3.Submit a form Via Enter
4.Convert a passed form reference to a string formatted like a JavaScript array of objects
5.Use form select control to trigger the action
6.form on submit event
7.Last-Minute Checking Before Form Submission
8.Use Image to trigger submit and reset actions
9.Submit a form by sending out an email
10.Demo: Ajax form submit
11.html input mask