i have a selsct box with values as follows
Now i want to sort values in this select box on click of a button dynamically in such a way that i see the sorted values in the select box instantly. Is there a wa y to do this. Please help
i have also to written the following function :
function sortByCode()
{
var selCodeArray= new Array()
for(i=0;i<document.form0.SelCurrency.length;i++)
{
var selValues=document.form0.SelCurrency.options.value
var splitValue= selValues.split("-" , selCode=splitValue[0]
selCodeArray=selCode
}
var srtSelCode=selCodeArray.sort()
}
.
.
.
.
<select size="15" name="SelCurrency">
<option value="CDN selected>CDN </option>
<option value="BDT">BDT</option>
<option value="BGL">BGL</option>
<option value="PJK">PJK </option></select>
Now i want to sort values in this select box on click of a button dynamically in such a way that i see the sorted values in the select box instantly. Is there a wa y to do this. Please help
i have also to written the following function :
function sortByCode()
{
var selCodeArray= new Array()
for(i=0;i<document.form0.SelCurrency.length;i++)
{
var selValues=document.form0.SelCurrency.options.value
var splitValue= selValues.split("-" , selCode=splitValue[0]
selCodeArray=selCode
}
var srtSelCode=selCodeArray.sort()
}
.
.
.
.
<select size="15" name="SelCurrency">
<option value="CDN selected>CDN </option>
<option value="BDT">BDT</option>
<option value="BGL">BGL</option>
<option value="PJK">PJK </option></select>