change 3 dropdown values through javascript
<p>i am using below script, need to change the value of 3 dropdown on the basis of first two, Currently it showing the same value to if i am changing the values in first dropdown. Here is the script---</p>

<pre><code>&lt;script type="text/javascript"&gt;

function changeprice(id){

    var value = id;

    if(value == ""){
         document.getElementById('price').value="";
         alert("Please select one valid word count");
         return false;
    }
    if(value == "Lessthan1000"){
        var newprice = "USD 290";
    }
    if(value == "Lessthan2000"){
        var newprice = "USD 540";
    }
    if(value == "Lessthan4000"){
        var newprice = "USD 1050";
    }
    if(value == "Lessthan6000"){
        var newprice = "USD 1900";
    }
    var eprice = newprice;

    document.getElementById('price').value = eprice;

}
&lt;/script&gt;

&lt;select name="sp" id="sp" class="servicecategory"&gt;
    &lt;option value="" selected&gt;Please Select...&lt;/option&gt;
    &lt;option value="Medical and Biomedical Manuscript Writing" &lt;?php if($servicename == "Medical and Biomedical Manuscript Writing"){ echo(" selected=\"selected\""); } ?&gt;&gt;Medical and Biomedical Manuscript Writing&lt;/option&gt;
    &lt;option value="Medical and Biomedical Manuscript Rewriting" &lt;?php if($servicename == "Medical and Biomedical Manuscript Rewriting"){ echo(" selected=\"selected\""); } ?&gt;&gt;Medical and Biomedical Manuscript Rewriting&lt;/option&gt;
&lt;/select&gt;

&lt;select name="Word_Count" id="Word_Count" onChange="changeprice(this.value)"&gt;
    &lt;option value="" selected&gt;Please Select...&lt;/option&gt;
    &lt;option value="Lessthan1000"&gt;1 - 1000 words&lt;/option&gt;
    &lt;option value="Lessthan2000"&gt;1001 - 2000 words&lt;/option&gt;
    &lt;option value="Lessthan4000"&gt;2001 - 4000 words&lt;/option&gt;
    &lt;option value="Lessthan6000"&gt;4001 - 6000 words&lt;/option&gt;
&lt;/select&gt;

&lt;tr&gt;
    &lt;td valign="top" align="right"&gt;Price:&lt;/td&gt;
    &lt;td width="5"&gt;&lt;/td&gt;
    &lt;td valign="top" align="left"&gt;&lt;input type="text" name="price" id="price" value="" readonly="" size="20"&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
</code></pre>

<p>Need to change the value once i selected the Medical and Biomedical Manuscript Rewriting in the first dropdown.  any suggestion what to do now ? its working fine for Medical and Biomedical Manuscript writing-- Thankyou</p>
