Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9047143
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T11:49:58+00:00 2026-06-16T11:49:58+00:00

i am using below script, need to change the value of 3 dropdown on

  • 0

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—

<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;

}
</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>

<select name="Word_Count" id="Word_Count" 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>

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T11:49:59+00:00Added an answer on June 16, 2026 at 11:49 am

    Here is a function that you can use as an onchange event:

    HTML (notice the onchange event):

    <select name="sp" id="sp" class="servicecategory" onChange="change_select_values(this.value)">
    

    JS:

    function change_select_values(val){
        var sel = document.getElementById('Word_Count');
        switch(val){
            case "Medical and Biomedical Manuscript Rewriting":
                sel.options.length = 0; // clear select options
                sel.options[0] = new Option('TEXT', 'VALUE');
                sel.options[1] = new Option('TEXT', 'VALUE');
                sel.options[2] = new Option('TEXT', 'VALUE');
                sel.options[3] = new Option('TEXT', 'VALUE');
                break;
            default:        
                sel.options.length = 0;
                sel.options[0] = new Option('1 - 1000 words', 'Lessthan1000');
                sel.options[1] = new Option('1001 - 2000 words', 'Lessthan2000');
                sel.options[2] = new Option('2001 - 4000 words', 'Lessthan4000');
                sel.options[3] = new Option('4001 - 6000 words', 'Lessthan6000');
        }
        changeprice(sel.options[0].value); // change input value
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the script below, so user can upload their profile picture. The first
I'm using below javascript to set value to cell in a tabular form. <script
I'm using ajax login script in my store, so i'm using below script to
I'm using this script below for loading a hidden div, inside another: $(document).ready(function(){ $(function()
I have tested the below script on a demo page which is not using
I want to enable auto update script in flex3. i am using below code
I am using this Ajax script below to make cross domain Ajax calls which
The script below worked on my Mac OS X. I'm now using Ubuntu OS,
I am using the script code below to get results from my database based
I have a small script which im using to test PHP mail(), as below:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.