...

View Full Version : List box to text box



dips_007
03-22-2004, 10:31 PM
hello how do i get the data from a listbox to go in to a text box

eg if i select a city eg london in a list then click a button the word london goes in to the text box
list box is called city
textbox is called town

brothercake
03-22-2004, 10:40 PM
Here's one way:


var theForm = document.forms["formname"];
theForm.town.value = theForm.city.options[theForm.city.options.selectedIndex].value;



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum