Vanilla 1.1.9 is a product of Lussumo. More Information: Documentation, Community Support.
function myfunc () {
var frm = document.getElementById("foo");
frm.submit();
}
window.onload = myfunc;
< body onload="document.forms.quoteyform.calculate(this)" >
< form id="quoteyform" action="whatever.foo" onsubmit="return false" >
< input type="text" class="total" name="result" id="result" maxlength="9" />
...............
< input type="button" value="" onclick="calculate(this)" class="rememberMe" id="test" name="test" /> This updates the "total" area above
< /form>
"The getElementById() method doesn't work in XML". In an XML document, you must search through attributes that have the type id, and this type must be declared in the XML document's Document Type Definition (DTD)."
<head>
<script>
function activateCalc()
{
document.getElementById('buttonCalc').click();
}
/*I'm assuming your calculate function already exists*/
</script>
</head>
<body onload="activateCalc()">
<form id="quoteyform" onsubmit="return false" ><input type="hidden" name="phpMyAdmin" value="4594f30712f4fabaff6997416810f3f2" />
....whatever else goes here....
<input type="button" onclick="calculate(this)" value="test button" id="buttonCalc" name="buttonCalc" />
</form>
</body>
<head>
<script>
function activateCalc()
{
document.getElementById('buttonCalc').click();
}
</script>
</head>
<body onload="activateCalc()">
<form id="quoteyform" ><input type="hidden" name="phpMyAdmin" value="4594f30712f4fabaff6997416810f3f2" />
....whatever else goes here....
<input type="button" onclick="calculate(this)" value="test button" id="buttonCalc" name="buttonCalc" />
</form>
</body>
<script>
activateCalc();
</script>
</body>
calculate(document.getElementById("buttoncalc")) You should be fine. This whole click()ing a button to fire a function thing is pretty ridiculous.
1 to 13 of 13