Hello, please help me to convert this form code to chronoform :
Thank You...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<script type="text/javascript" language="Javascript">
var v1 = 0;
var v2 = 28000;
var answer = 0;
function calculate () {
// The Calculation: change operator in this equation to change the calculation
answer = v1 * v2;
var elem;
elem = document.getElementById("v1");
elem.value = v1;
elem = document.getElementById("v2");
elem.value = v2;
elem = document.getElementById("answer");
elem.value = answer;
}
function setValue(elem) {
var val = 0.0;
if (elem.value != "") {
val = parseFloat(elem.value);
}
else {
val = 0.0;
}
switch (elem.id) {
case "v1": v1 = val; break;
case "v2": v2 = val; break;
}
calculate();
}
</script>
</head>
<body onload="calculate();">
<form>
<input type="text" id="v1" onKeyUp="javascript: setValue(this);"> *
<input type="text" id="v2" onKeyUp="javascript: setValue(this);" readonly="readonly"> =
<input type="text" id="answer" readonly>
</form>
</body>
</html>
Thank You...
Hi kangwawan,
In the Forms Manager, click the New Form icon to create a new form; give it a name on the general tab. Click the Form Code tab.
Open the Form JavaScript box and paste in the part of your code between the <script . . .> & </script> tags (but not the tags themselves).
Open the Form HTML box and paste in the part of your code between the <form. . .> & </form> tags (but not the tags themselves).
Save the form and publish it.
Bob
In the Forms Manager, click the New Form icon to create a new form; give it a name on the general tab. Click the Form Code tab.
Open the Form JavaScript box and paste in the part of your code between the <script . . .> & </script> tags (but not the tags themselves).
Open the Form HTML box and paste in the part of your code between the <form. . .> & </form> tags (but not the tags themselves).
Save the form and publish it.
Bob
This topic is locked and no more replies can be posted.
