E
ewitkop90
Here is my code:
<SCRIPT>
function transportchange(transport) {
if (framenewinstall.Helpdesk.checked)
framenewinstall.Helpdesk.checked=false;
if (framenewinstall.CircuitNumber.checked)
framenewinstall.CircuitNumber.checked=false;
switch (transport) {
case 0:
Helpdesk.innerText="No Info Needed";
CircuitNumber.innerText="FMS Number";
break;
case 1:
Helpdesk.innerText="GTS Contact Number";
CircuitNumber.innerText="Circuit Number";
break;
}
}
</SCRIPT>
<FORM method="POST" name="framenewinstall"
action="http://server/cgi-bin/Erik-FormMail.pl">
<INPUT TYPE="RADIO" NAME="Transport" VALUE="Sprint"
onclick="transportchange(0);" CHECKED>
Sprint
<INPUT TYPE="RADIO" NAME="Transport" VALUE="GTS"
onclick="transportchange(1);">
GTS<BR>
<input type="text" name="Helpdesk">
<label id="Helpdesk" for="Helpdesk">Helpdesk</label><BR>
<INPUT TYPE="text" NAME="CircuitNumber">
<LABEL ID="CircuitNumber" FOR="CircuitNumber">Circuit
Number</LABEL> <BR>
It is working, meaning that it changes the html OUTSIDE of the field
itself. But what I am looking to do is auto populate the helpdesk phone
# inside the field, depending on whether you select Sprint or GTS. I
thought it would be called an initval but that is not it.
<SCRIPT>
function transportchange(transport) {
if (framenewinstall.Helpdesk.checked)
framenewinstall.Helpdesk.checked=false;
if (framenewinstall.CircuitNumber.checked)
framenewinstall.CircuitNumber.checked=false;
switch (transport) {
case 0:
Helpdesk.innerText="No Info Needed";
CircuitNumber.innerText="FMS Number";
break;
case 1:
Helpdesk.innerText="GTS Contact Number";
CircuitNumber.innerText="Circuit Number";
break;
}
}
</SCRIPT>
<FORM method="POST" name="framenewinstall"
action="http://server/cgi-bin/Erik-FormMail.pl">
<INPUT TYPE="RADIO" NAME="Transport" VALUE="Sprint"
onclick="transportchange(0);" CHECKED>
Sprint
<INPUT TYPE="RADIO" NAME="Transport" VALUE="GTS"
onclick="transportchange(1);">
GTS<BR>
<input type="text" name="Helpdesk">
<label id="Helpdesk" for="Helpdesk">Helpdesk</label><BR>
<INPUT TYPE="text" NAME="CircuitNumber">
<LABEL ID="CircuitNumber" FOR="CircuitNumber">Circuit
Number</LABEL> <BR>
It is working, meaning that it changes the html OUTSIDE of the field
itself. But what I am looking to do is auto populate the helpdesk phone
# inside the field, depending on whether you select Sprint or GTS. I
thought it would be called an initval but that is not it.