
April 11th, 2002, 03:52 AM
|
|
Contributing User
|
|
Join Date: Dec 2002
Posts: 14,575
  
Time spent in forums: < 1 sec
Reputation Power: 23
|
|
|
dynamic list filling box (onChange)
<i><b>Originally posted by : suzanne (stagssg02@mtq.gouv.qc.ca)</b></i><br />i want to know how to do this: i got a dynamic list (contains name of clients), when i select a name in this list,the first name and the phone number of the selected name suppose to appear in <input...>. i make my onChange() function on the select, but nothing works. i look for more then 2 days, please help me. here my function: (i just try for the first name, imagine...)<br /><script language = "javaScript"><!--<br />var liste<br />liste=new Array()<br />liste[0]=new Array("vide!","")<br /><br /><%while not rs.eof<br /> sql2="select * from tblUtilisateur where idUtilisateur="&rs("idUtilisateur") <br /> rs2.Open sql2,conn <br /><br />%> <br />liste[<%=rs("idUtilisateur")%>]=new Array(<%<br /> <br /> nomUtil=rs2("nomUtil")<br /> response.write""""&(nomUtil)&"""," <br /> rs2.close<br /> %>"")<br /><br /><%rs.moveNext<br />wend<br />%><br /><br />function changeListe(){<br />choix=document.FrontPage_Form1.identificationNT.va lue<br />t="<input type='text' name='nomUtil' >"<br /><br />for(i=0;i<liste[choix].length;i++)<br /> t+="value="+liste[choix][i]+<br /> document.FrontPage_Form1.nomUtil.outerHTML=t+<br /> <br />}<br /> <br />
|