I have a form that has the user pick the type of question he will answer.
The input field will be a text, numeric or date type. So, after the
question is answered, I need to change the input statement. This resembles
what I am doing:
<form name="frm1">
Step 1 - Choose a File: <select name="selA" OnChange="makei nputbox;"
width="200" style="width:20 0">
<option value="">Date of Birth</option>
<option value="MASTER"> Age</option>
<option value="ADDRESS3 ">Maiden Name</option>
Step 2 - Insert Value: <INPUT TYPE="text" NAME="MySingleL ineTextBox"
SIZE=50 MAXLENGTH=75 VALUE="">
</select>
</form>
<script language="JavaS cript">
<!--
function makeinputbox {
document.frm1.M ySingleLineText Box.TYPE='numer ic';
document.frm1.M ySingleLineText Box.SIZE=5;
document.frm1.M ySingleLineText Box.MAXLENGTH=5 ;
document.frm1.M ySingleLineText Box.value=1.00;
}
// -->
</script>
The only thing that happens is that the value gets set to 1, not 1.00. The
input bo still keeps all of its original characteristics .
Any ideas what I need to do?
TIA.
Boyd
The input field will be a text, numeric or date type. So, after the
question is answered, I need to change the input statement. This resembles
what I am doing:
<form name="frm1">
Step 1 - Choose a File: <select name="selA" OnChange="makei nputbox;"
width="200" style="width:20 0">
<option value="">Date of Birth</option>
<option value="MASTER"> Age</option>
<option value="ADDRESS3 ">Maiden Name</option>
Step 2 - Insert Value: <INPUT TYPE="text" NAME="MySingleL ineTextBox"
SIZE=50 MAXLENGTH=75 VALUE="">
</select>
</form>
<script language="JavaS cript">
<!--
function makeinputbox {
document.frm1.M ySingleLineText Box.TYPE='numer ic';
document.frm1.M ySingleLineText Box.SIZE=5;
document.frm1.M ySingleLineText Box.MAXLENGTH=5 ;
document.frm1.M ySingleLineText Box.value=1.00;
}
// -->
</script>
The only thing that happens is that the value gets set to 1, not 1.00. The
input bo still keeps all of its original characteristics .
Any ideas what I need to do?
TIA.
Boyd
Comment