...

View Full Version : javascript need help badly.



lexie
06-03-2009, 08:36 AM
Hi guys. I have a problem.
Code:


<form id="studentform" name="studentform" method="post" action="studentcreation.jsp">

<td align="right">Id no</td>
<td>
<select style="width:200px" name="idno" id="idno">
<option></option>
</select>
</td>
</tr>
<tr>
<td align="right">Student Name</td>
<td><input name="studentname" type="text" id="studentname" size="29"></td>

what i want to happen is in the dropdown, i have codes there that shows all the idno in my database. so when i click the idno, the corresponding student name will appear in the studentname textfield. can someone help me on how to do it? i think javascript onClick will be used here. any thoughts? thank you.

Philip M
06-03-2009, 09:35 AM
You need to do this server-side, for example with an AJAX call.

Are you really planning to have all the (numerous?) students' id numbers in a dropdown?


Do please read the posting guidelines regarding silly thread titles. The thread title is supposed to help people who have a similar problem in future. Yours is useless for this purpose.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum