Change function on Select
<p>Continue from <a href="http://stackoverflow.com/questions/14079113/change-3-dropdown-values-through-javascript">change 3 dropdown values through javascript</a>, Just need to show the </p>

<pre><code>function changeprice1(id){
</code></pre>

<p>On select of second dropdown i.e. <code>Medical and Biomedical Manuscript Rewriting</code>. What to do now, i am getting out of thinking now. Any Help in <code>jS</code> ? </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;

}

function changeprice1(id){

var value = id;

if(value == ""){
    document.getElementById('price').value="";
alert("Please select one valid word count");

return false;
}
if(value == "ReLessthan1000"){
var newprice = "USD 390";
}
if(value == "ReLessthan2000"){
var newprice = "USD 690";
}
if(value == "ReLessthan4000"){
var newprice = "USD 1600";
}
if(value == "ReLessthan6000"){
var newprice = "USD 2900";
}
var eprice = newprice;

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

}&lt;/script&gt;
</code></pre>

<p>Here is the first dropdown</p>

<pre><code>&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;
</code></pre>

<p>Here is the Second Dropdown --- </p>

<pre><code>&lt;select name="sp" id="sp" class="servicecategory" 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;
</code></pre>

<p>This is the price area where the price is showing atlast</p>

<pre><code>&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>
