View Single Post
Old 16-05-2007, 19:48   #2 (permalink)
Cborrow
I like code.
 
Join Date: Dec 2004
Location: Chesapeake, VA
Posts: 237
Send a message via AIM to Cborrow
Well you can get the name and value of the selected dropdown like so, I believe.

Code:
var selectedItem = document.forms[0].selectName.options['document.forms[0].selectName.options.selectedIndex]; var name = selectedItem.getAttribute('name'); var value = selectedItem.value;

then to add it to a textbox

Code:
document.forms[0].textBoxName.value = str;

I think that might work.

You can replace forms[0] with your form name and selectName and textBoxName are the names of the select and textbox

e.g.
Code:
<input type="text" name="textBoxName" /> <select name="selectName"> </select>
  Reply With Quote