Forums
This topic is locked
autofill problem
29 Jul 2008 01:41:06 hk tman posted:
Im trying to use autofill from a sample I got on this forum. It works ok but I need to pass OperatonsDropDown and DetailText as seperate variables. Instead this sets both the same.If I run this and submit operation1 and detail1 I get:
mtest/webdata/ftps.shtml?OperationDropDown=detail+1&DetailText=detail+1
What I want is:
mtest/webdata/ftps.shtml?OperationDropDown=Operation+1&DetailText=detail+1
any help would be appreciated.
=========================================================
<html>
<Script Language="JavaScript">
function fillText()
{
document.testForm.DetailText.value=document.testForm.OperationDropDown.value;
}
</Script>
<body>
UNDER CONSTRUCTION<br><br>
<form name="testForm" id="testForm" action="">
<select name="OperationDropDown" onChange="fillText()" name="OperationDropDown">
<option value="" selected="true">Select an operation</option>
<option value="detail 1">operation 1</option>
<option value="detail 2">operation 2</option>
<option value="detail 3">operation 3</option>
</select><br>
<input type="text" name="DetailText" id="DetailText" size="10">
<input type=submit value="RUN"> <input type=reset > <br>
</form>
</body>
</html>