javascript を使用して 3 つのドロップダウン値を変更することから続行します。
function changeprice1(id){
2番目のドロップダウンを選択すると、つまりMedical and Biomedical Manuscript Rewriting
。今何をすべきか、私は今考えなくなりつつあります。のヘルプはありjS
ますか?
<script type="text/javascript">
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;
}</script>
最初のドロップダウンはこちら
<select name="sp" id="sp" class="servicecategory">
<option value="" selected>Please Select...</option>
<option value="Medical and Biomedical Manuscript Writing" <?php if($servicename == "Medical and Biomedical Manuscript Writing"){ echo(" selected=\"selected\""); } ?>>Medical and Biomedical Manuscript Writing </option>
<option value="Medical and Biomedical Manuscript Rewriting" <?php if($servicename == "Medical and Biomedical Manuscript Rewriting"){ echo(" selected=\"selected\""); } ?>>Medical and Biomedical Manuscript Rewriting</option>
</select>
これが 2 番目のドロップダウンです ---
<select name="sp" id="sp" class="servicecategory" onChange="changeprice(this.value)">
<option value="" selected>Please Select...</option>
<option value="Lessthan1000">1 - 1000 words</option>
<option value="Lessthan2000">1001 - 2000 words</option>
<option value="Lessthan4000">2001 - 4000 words</option>
<option value="Lessthan6000">4001 - 6000 words</option>
</select>
これは、最後に価格が表示されている価格帯です
<tr>
<td valign="top" align="right">Price:</td>
<td width="5"></td>
<td valign="top" align="left"><input type="text" name="price" id="price" value="" readonly="" size="20"><br />
</td>
</tr>