Hi everyone and thanks for looking. I have a multiselect list on a page that’s been pre-populated from a database.
I now need to grab all data from the list and turn it into separate links The drop-down could in theory be of any length and the list value is used as the record ID, so…
<select id="Inf1">
<option value="147">Art Tatum</option>
<option value="151">Charles Mingus</option>
<option value="172">John Coltrane</option>
</select>
should be re-written as:
<div id="Artists">
<a href="/tabid/89/xmmid/393/xmid/147/xmview/3/default.aspx">Art Tatum</a>
<a href="/tabid/89/xmmid/393/xmid/151/xmview/3/default.aspx">Charles Mingus</a>
<a href="/tabid/89/xmmid/393/xmid/172/xmview/3/default.aspx">John Coltrane</a>
</div>
Thanks.
Something like this should work, here’s a jsfiddle as well, even though I strongly suggest you create the links on the server instead.
http://jsfiddle.net/nQsTF/