.. i.e.
a normal select tag is like this:
<Option Value="Name">Name</Option>
I have 3 text boxes, 1st for ID, 2nd for FirstName, 3rd for LastName,
I have a database created select box which contains about 10 records...
each record is like this:
"<option value=" & r("ID") & ">" & r("FirstName") & " " & r("LastName") & "</option>"
when i choose one of these items, i want to automatically fill the 3 boxes with the records ID, FirstName, LastName
I do this using JavaScript...
document.Form.Box1.value = document.DataBase.Select.value
(where DataBase is the name of the form containing the 3 text boxes)
here the value will be written as the ID, so the Value of the 1st text box will be the "ID"
for text box 2 and 3, how can i put the other data (FirstName and LastName),
I tried this but didn't work:
document.Form.Box2.value = document.DataBase.Select.text
I also tried this but didn't work too...
"<option first=" & r("FirstName") & " last=" & r("LastName") & " value=" & r("ID") & ">" & r("FirstName") & " " & r("LastName") & "</option>"
document.Form.Box1.value = document.DataBase.Select.value
document.Form.Box2.value = document.DataBase.Select.first
document.Form.Box3.value = document.DataBase.Select.last
Is there a way of doing so?
Thanks.