I have a form in ASP.net that has a checkbox option to auto populate the form with the user infomation that is held in an table. When I select the checkbox the auto populate works well with texboxes in the form, but the auto populate does not work completely because a field in the form called shipcamp uses a dropdown list. How can I auto populate the camp field dropdown list as well using JavaScript? Thank you!
-Tsu
-----JAVASCRIPT--------
-Tsu
-----JAVASCRIPT--------
Code:
%>
<!--#include file="../includes/top.asp"-->
<script language="JavaScript">
<!-- Function for auto-complete shipping address!
function fillAddressFields(form) {
form.elements['shipgrade'].value = '<%=grade%>';
form.elements['shipfname'].value = '<%=fname%>';
form.elements['shiplname'].value = '<%=lname%>';
form.elements['shipunit'].value = '<%=organization%>';
form.elements['shipbldg_no'].value = '<%=bldg_no%>';
form.elements['shipphone'].value = '<%=phone_no%>';
form.elements['firstsigner'].value = '<%=asigner1%>';
form.elements['shipcamp'].text = '<%=camp%>';
form.elements['shipdirections'].value = '<%=directions%>';
form.elements['shipphone1'].value = '<%=asigner1phone%>';
}
//-->
Comment