troubleshooting Question

Change drop down values on radio button select

Avatar of BrighteyesDesign
BrighteyesDesignFlag for Afghanistan asked on
JavaScriptHTMLPHP
11 Comments1 Solution2172 ViewsLast Modified:
search
For a real estate search I need to populate the Minimum Price and Maximum Price dropdowns differently depending on whether the user selects  'Buy' or 'Rent'

The code I use at the moment is...

 <form id="form2" name="form1" action="internationalsearchrefine.php" method="get">
<input name="saleOrRent" type="radio" class="radiogap" id="saleOrRent" value="sales" checked="checked" />
      <span class="buyrent">Buy</span>
      <input name="city" type="hidden" id="city" value="456">
      <input name="intsearch" type="hidden" id="insearch" value="GBR">
      <span class="copy">
      <input name="saleOrRent" type="radio" class="radiogap" id="saleOrRent2" value="rent" />
      </span><span class="buyrent">Rent</span>
      <div>
        <select name="min" class="select" id="min">
          <option value="0" selected>Minimum Price</option>
             <option value="250">£250</option>
          <option value="500">£500</option>
          <option value="750">£750</option>
          <option value="1000">£1,000</option>
          <option value="2000">£2,000</option>
          <option value="4000">£4,000</option>
          <option value="7000">£7,000</option>
          <option value="10000">£10,000</option>
          <option value="15000">£15,000</option>
          <option value="25000">£25,000</option>
          <option value="50000">£50,000</option>
          <option value="75000">£75,000</option>
          <option value="100000">£100,000</option>
          <option value="150000">£150,000</option>
          <option value="200000">£200,000</option>
          <option value="400000">£400,000</option>
          <option value="500000">£500,000</option>
          <option value="600000">£600,000</option>
          <option value="700000">£700,000</option>
          <option value="800000">£800,000</option>
          <option value="900000">£900,000</option>
          <option value="1000000">£1,000,000</option>
          <option value="1250000">£1,250,000</option>
          <option value="1500000">£1,500,000</option>
          <option value="2000000">£2,000,000</option>
          <option value="3000000">£3,000,000</option>
          <option value="6000000">£6,000,000</option>
          <option value="10000000">10,000,000</option>
        </select>
      </div>
      <div>
        <select name="max" class="select" id="max">
          <option value="1000000000" selected>Maximum Price</option>
          <option value="500">£500</option>
          <option value="750">£750</option>
          <option value="1000">£1,000</option>
          <option value="2000">£2,000</option>
          <option value="4000">£4,000</option>
          <option value="7000">£7,000</option>
          <option value="10000">£10,000</option>
          <option value="15000">£15,000</option>
          <option value="25000">£25,000</option>
          <option value="50000">£50,000</option>
          <option value="75000">£75,000</option>
          <option value="100000">£100,000</option>
          <option value="150000">£150,000</option>
          <option value="200000">£200,000</option>
          <option value="400000">£400,000</option>
          <option value="500000">£500,000</option>
          <option value="600000">£600,000</option>
          <option value="700000">£700,000</option>
          <option value="800000">£800,000</option>
          <option value="900000">£900,000</option>
          <option value="1000000">£1,000,000</option>
          <option value="1250000">£1,250,000</option>
          <option value="1500000">£1,500,000</option>
          <option value="2000000">£2,000,000</option>
          <option value="3000000">£3,000,000</option>
          <option value="6000000">£6,000,000</option>
          <option value="10000000">10,000,000</option>
        </select>
      </div>
      <br>
      <div>
        <select name="bedrooms" class="select" title="Bedrooms" id="bedrooms">
 <option value="">Any</option>          
 <option value="1">1</option>
          <option value="2">2</option>
          <option value="3">3</option>
          <option value="4">4</option>
          <option value="5">5</option>
         <option value="6">6</option>
         <option value="7">7</option>
         <option value="6">8</option>
         <option value="9">9</option>
         <option value="10">10</option>
         <option value="11">11</option>
         <option value="12">12</option>
         <option value="13">13</option>
         <option value="14">14</option>
         <option value="15">15</option>
        </select>
      </div>
      <br>
      <input name="submit" type="image" id="submit" src="images/searchwhite.png" alt="Add to Basket" />
      <br>
</form>

The values are not dynamic which hopefully makes this easier.

Any ideas how to do this?
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 11 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 11 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros