Hi folks,
I'd appreciate some help with a form element task I wish to achieve.
I have a form containing three elements (2 text and 1 select).
[sNewNodeTitle]
[iNodeID] <--- select
[sLinkText]
For reasons that aren't important here, the user will either enter
something into sNewNodeTitle or select an existing item from the
iNodeID dropdown list. What I want to do is have either the entered
text or the text between the iNodeID select tags to be replicated
into sLinkText.
I've achieved the latter with
$('#sNewNodeTitle').keyup(function(){if(this.value.length>0)
$('#sLinkText').val(this.value);});
but I don't know how to get the required info from the select
element. I don't want the value of the selected select element (it
will be an integer) - I need the text.
Can someone please provide me with some direction here.
Thanks,
Bruce
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/