View Full Version : sample scripts in drop downs and populating text boxes
03-17-2005, 08:06 AM
Hi guys, can you give me a sample script in populating a text box based on the choices in the drop down menu based in PHP and Mysql. Im researching this for my school project and i really need it very badly. If its okay wth you guys? By the way, cool site :thumbsup: . My cousin told me he gets great advices from you guys thats why he recommended me this website. STAY COOL guys... :thumbsup:
03-17-2005, 08:47 AM
This is basically how you do it.
<select name="mysel" onchange="this.form.mytext.value=this.options[this.selectedIndex].value">
<option value="">Please select</option>
<option value="This is item 1">item 1</option>
<option value="This is item 2">item 2</option>
<option value="This is item 3">item 3</option>
<input type="text" name="mytext" />
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.