Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

after choosing from combobox => fields must be filled with DB-records

Status
Not open for further replies.

ikkeikke

Programmer
Jan 25, 2003
3
0
0
BE
This is the code I have so far. I know it is not much but...


<%@ language=&quot;vbscript&quot; %>
<% option explicit
dim cnn
dim rst
dim strconnstring
dim strnaam

'verbinding
Set Cnn = Server.CreateObject(&quot;ADODB.Connection&quot;)
strConnString = &quot;DRIVER={Microsoft Access Driver (*.mdb)};&quot; & _
&quot;DBQ=&quot; & Server.MapPath(&quot;\samcampus\db\adf.mdb&quot;) & &quot;;&quot;
Cnn.Open(strConnString)

set rst = cnn.execute(&quot;SELECT * FROM sponsors&quot;)

%>

<html>
<head>
<script language=&quot;vbscript&quot;>

public sub gegweergeven
msgbox(&quot;test&quot;)
loop

end sub

</script>
<title>sponsorgegevens aanpassen</title>
</head>

<body>
<center><h1>sponsorgegevens aanpassen</h1></center>
<hr><br>
<form method=&quot;post&quot;>


<%

'keuzelijst
rst.movefirst
Response.Write &quot;<select name='Keuze' onchange='gegweergeven'>&quot;
Do until rst.EOF
Response.Write &quot;<option>&quot; & rst(&quot;Naam&quot;) & &quot;</option>&quot;
rst.movenext
Loop
response.write &quot;</select><p>&quot;


'aanmaken tekstvakken
response.write &quot;<table border='1'><tr><td>naam:</td><td><input type='text' name='txtnaam'></td></tr>&quot;
response.write &quot;<tr><td>contact:</td><td><input type='text' name='txtcontact'></td></tr>&quot;
response.write &quot;<tr><td>straat:</td><td><input type='text' name='txtstraat'></td></tr>&quot;
response.write &quot;<tr><td>postcode:</td><td><input type='text' name='txtpostcode'></td></tr>&quot;
response.write &quot;<tr><td>gemeente:</td><td><input type='text' name='txtgemeente'></td></tr>&quot;
response.write &quot;<tr><td>telefoon nummer:</td><td><input type='text' name='txttel'></td></tr>&quot;
response.write &quot;<tr><td>fax nummer:</td><td><input type='text' name='txtfax'></td></tr>&quot;
response.write &quot;<tr><td>gsm:</td><td><input type='text' name='txtgsm'></td></tr>&quot;
response.write &quot;<tr><td>jaar:</td><td><input type='text' name='txtjaar'></td></tr>&quot;
response.write &quot;<tr><td>bedrag:</td><td><input type='text' name='txtbedrag'></td></tr></table>&quot;
response.write &quot;<p>&quot;
response.write &quot;<input type='button' name='cmdopslaan' value='opslaan'>&quot;
%>

</form>
</body>

</html>

please If somebody could help me with this problem?!?

thx
 
I'm sory I forgot to mention the problem

when you choose a name out af the drop down list the fields must be automattically be filled with the appropiate records from the DB.

when the user makes changes in the fields, it must be updated to the database after clickin on the button &quot;opslaan&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top