Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jun 2009
    Thanked 0 Times in 0 Posts

    Exclamation javascript need help badly.

    Hi guys. I have a problem.

    <form id="studentform" name="studentform" method="post" action="studentcreation.jsp">
    		<td align="right">Id no</td>
    			<select style="width:200px" name="idno" id="idno">
    		<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.
    Last edited by lexie; 06-03-2009 at 08:42 AM.

  2. #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    London, England
    Thanked 2,703 Times in 2,679 Posts
    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.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts