Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
<BUTTON onClick
<BUTTON on_click
<script>
function mysubmitfunction(objButton) {
var oktosubmit = true;
// do some client checking here if all the form elements contain valid data.
// a form element can be addressed like this:
// eval('myform.myelement').value
// if you cannot submit because some data in the form is not valid
// you have to set the oktosubmit to false
if(oktosubmit) {
if(objButton.name=="sub1") {
myform.action='sub1.asp';
}
else {
myform.action='sub2.asp';
}
myform.submit();
}
else {
// to prevent the user to click on the submit button twice really fast and submit the page twice
// the button was disabled but because the form cannot be
// submitted we have to tell the user to correct his/her input
// and give the user the opportunity to submit again.
objButton.enabled = true;
return false;
}
}
</script>
<form name=myform id=myform>
<input type=text>
<input type=button onclick="mysubmitfunction(this);" name="sub1" value="submit1">
<input type=button onclick="mysubmitfunction(this);" name="sub2" value="submit2">
</form>
var oInterval;
oInterval=window.setInterval("stopTimer()", 2000);
function stopTimer() {
window.clearInterval(oInterval);
document.form.submit();
}
form