new to HTML/Javascript
Trying to create a HTML form that takes in 6 different input values from user, which are all integers.
on submit will then output a text file which is just lines of text which have the inputs in bedded
example ask for inputs input1 : input2 : input3 : input4 : input5 : input6 :
then on submit have a text file generated with
command1:input1input2:command2,test
command1:input3input4:command2,test
command1:input4:command2,test
command1:input5:command2,test
command1:input6input2:command2,test
essentially its a form, repeating same set of strings in a text, but the inputs are taken into account.
sorry about the missing example here it is
i have been using alerts, and want to switch this to writing the alerts line by line into a text file and download it..
<!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>
<title>
TEST FORM
</title>
<script language="JavaScript" type="text/javascript">
//<![CDATA[
function testResults (form) {
var TestVar1 = form.inputbox1.value;
var TestVar2 = form.inputbox2.value;
var TestVar3 = form.inputbox3.value;
var TestVar4 = form.inputbox4.value;
var TestVar5 = form.inputbox5.value;
var TestVar6 = "command" + TestVar1 + TestVar2 + "command2"
alert ("command1: " + TestVar1 );
alert ("command2: " + TestVar2 + TestVar2 + "command5");
alert ("command3: " + TestVar3 + "command5;;:" + TestVar2);
alert ("command4: " + TestVar4 + "command1;;" + TestVar2);
alert ("command5: " + TestVar5 + "command2" + TestVar2);
alert ("command6: " + TestVar6 + TestVar2);
}
//]]>
</script>
</head>
<body>
<form name="myform" action="" method="get" id="myform">
Enter something in the box:<br />
<label for="input1">input1</label> <input type="text" name=
"inputbox1" value="" id="input1" />
<p>
<label for="input1">input2</label> <input type="text" name=
"inputbox2" value="" id="input2" />
</p>
<p>
<label for="input1">input3</label> <input type="text" name=
"inputbox3" value="" id="input3" />
</p>
<p>
<label for="input1">input4</label> <input type="text" name=
"inputbox4" value="" id="input4" />
</p>
<p>
<label for="input1">input5</label> <input type="text" name=
"inputbox5" value="" id="input5" />
</p>
<p>
<input type="button" name="button" value="Click" onclick=
"testResults(this.form)" />
</p>
</form>
</body>