how can i fill an select option list with the selection of different-2 radiobuttons using javascript
<p>i have to fill a select ooption list dynamically with the selection of diffent-2 radiobuttons using java script.. right now i am applyiing it but it is not working properly</p>

<pre><code>{
 var i;
 var x1;
 var x3;
 var x=document.getElementById("ddbudget_min");//option list1
 var x2=document.getElementById("ddbudget_max");//optionlist2
 x1=x.length;
 for (x1 = x.length; x1 &gt;= 0; x1--) {
      x[x1] = null;
 }
 x3=x2.length;
 for (x3 = x2.length; x3 &gt;= 0; x3--) {
     x2[x3] = null;
 }


 x[0] = new Option("select min", 1);
 x[1] = new Option(1000, 2);
 x[2] = new Option(5000, 3);
 x[3] = new Option(10000, 4);
 x[4] = new Option(20000, 5);
 x[5] = new Option(50000, 6);
 x[6] = new Option("1 lakh", 7);
 x[7] = new Option("&gt;1 lakh", 8);

 x2[0] = new Option("select max", 0);
 x2[1] = new Option(1000, 1);
 x2[2] = new Option(5000, 2);
 x2[3] = new Option(10000, 3);
 x2[4] = new Option(20000, 4);
 x2[5] = new Option(50000, 5);
 x2[6] = new Option("1 lakh", 6);
 x2[7] = new Option("&gt;1 lakh", 7);
}
</code></pre>
