I got 2 pages.. but I am having difficulty getting the Text value from a dropdownlist and inserting it into a textbox for instance this is Page 1
A user has 1 options to select on Page 1, the jquery code below is activated with the change function .
This will Load a new dropdownlist depending on which field they picked.
This all works Fine but my problem is getting the new value from the newlist into the keyword textbox how can i do that ?
<select id="pick"> <option></option> <option>Financial</option> </select> <div id="newlist" style="margin-left:180px;"> </div> <input type="text" id="keyword" /> <script> $("#pick").change(function () { if ($(this).val() == "Financial") { $("#newlist").load('/Listings/service #service'); $("#keyword").text() = $("#service").text(); } }); </script>
page2 is where the newlist is
<select name="service" id="service" style="background-color:red;">
<option>automotive</option>
<option>mechanic</option>
</select>
So again the gets the dropdownlist from Page2 but for some reason I can't transfer that value into the textbox any help would be great..
$("#keyword").val() = $("#service").val();instead