Hi,
Hopefully a quickie for you gurus
Heres what I'm trying to do -
1) Have a SELECT field, which has different values (in my case, as "Description") .. i.e;
(removed the <head><html> etc parts, to make it shorter and not waste so much space in the post
)
...then a form field, called:
Basically when someone click one an option from the above "SELECT", I'm trying to get it to then show the content of that field in the "foobar" input box bit.
Am I going about this the wrong way? :/
NB: I need to keep the "value" for the actual select field, i.e;
TIA for ANY help you can provide. I've hit a real head stomper on this one
Cheers
Andy
Hopefully a quickie for you gurus

Heres what I'm trying to do -
1) Have a SELECT field, which has different values (in my case, as "Description") .. i.e;
Code:
<SCRIPT language="JavaScript">
<!--
function stat_write(thetext) {
// alert("ergrdfg");
this.document.foobar.value = thetext;
}
//-->
</SCRIPT>
<select size="1" name="D1">
<option onselect="stat_write('your words 3')" >dfgdfgdg</option>
<option onselect="stat_write('your words 3')" >dfgdfgdfg</option>
<option onselect="stat_write('your words 3')" >dgdfgdfg</option>
</select>
(removed the <head><html> etc parts, to make it shorter and not waste so much space in the post

...then a form field, called:
Code:
<input type="text" readonly="yes" value="cat desc" name="foobar" >
Basically when someone click one an option from the above "SELECT", I'm trying to get it to then show the content of that field in the "foobar" input box bit.
Am I going about this the wrong way? :/
NB: I need to keep the "value" for the actual select field, i.e;
Code:
<option value="[B]NUMERIC_ID[/B]" onselect="stat_write('your words 3')" >dfgdfgdg</option>
TIA for ANY help you can provide. I've hit a real head stomper on this one

Cheers
Andy