Hi All
Anyone knows how do i store the selected value into a hidden field or variable so that i can use it for database insert ? Btw this is in ASP.
I took the jquery sample code from:
Here is my code:
<script type="text/javascript">
$(document).ready(function() {
$("#Part_ID").asmSelect({
addItemTarget: 'bottom',
animate: true,
highlight: true,
sortable: true
})
.after($("<a href='#Part_ID'>Select All</a>").click(function() {
$("#Part_ID").children().attr("selected", "selected").end().change();
return false;
}));
$('#other').click(function () {
$('.target').change
})
</script>
<tr class="cellcolor">
<td align="right" class="style4">
<font color="#FF0000"><b>*</b> </font><b>Part Name:</b>
</td>
<td>
<label for="Part_ID">Parts for this Product:</label>
<select id="Part_ID" multiple="multiple" class="target" title="Click to Select the Part Name">
<%
If not isnull(Part_ID) then
arrtemp = split(Part_ID,",")
End If
While (not RS.eof)
response.write "<option value=""" & RS("Part_ID") & """ "
if ubound(Filter(arrtemp, "Part_ID"))>0 then
if (cstr(Part_ID)=cstr(RS("Part_ID"))) then
response.write "selected"
end if
end if
dim ptName
ptName=RS("strPart")
response.write " >" & ptName & "</option>"
RS.movenext
wend
%>
</select>
<input id="text1" type="text"/>
<div id="other">
</div>
</td>
</tr>