beanymanuk Posted March 15, 2011 Share Posted March 15, 2011 Hi I am trying to make a lightbox appear if a radio button in a form it set to yes but not display if set to no and carry on to the forms target page eg results.php Yes / No radio buttons are at the bottom of the form <form id="#####" method="get" accept-charset="UTF-8" action="/####" class="right-nav"> Sales <input type="radio" name="s" value="S" checked> Lettings <input type="radio" name="s" value="L" > <select name="t" id="myList" class="select" style="width: 120px"> <option value="pleaseSelect">Property Type</option> <option value="">All</option> <option value="Terraced">Terraced</option> <option value="Semi">Semi</option> <option value="Detached">Detached</option> <option value="Flat">Flat</option> <option value="Bungalow">Bungalow</option> <option value="Maisonette">Maisonette</option> <option value="Mews">Mews</option> <option value="Commercial">Commercial</option> <option value="Land">Land</option> </select> <select name="bedrooms" id="myList2" class="select" style="width: 120px"> <option value="pleaseSelect">Min Beds</option> <option value="">1</option> <option value="">2</option> <option>3</option> <option>4</option> <option>5</option> <option>6</option> </select> <select name="price[min]" id="myList3" class="select" style="width: 120px"> <option value="pleaseSelect">Min Value</option> <option value="">Any</option> <option value="100000">£100,000</option> <option value="200000">£200,000</option> <option value="300000">£300,000</option> <option value="400000">£400,000</option> <option value="500000">£500,000</option> </select> <select name="price[max]" id="myList4" class="select" style="width: 120px"> <option value="pleaseSelect">Max Value</option> <option value="">Any</option> <option value="100000">£100,000</option> <option value="200000">£200,000</option> <option value="300000">£300,000</option> <option value="400000">£400,000</option> <option value="500000">£500,000</option> </select> <input type="text" size="16" name="keyword" class="right-nav-keyword" value="" onclick="this.value=''" style="border-color: rgb(0, 85, 164); border:1px solid; width: 110px;"> <p class="right-text"> <b>E-Mail Alerts</b><br>Would you like to save these search criteria for your property e-mail alerts? <p>Yes <input type="radio" name="Type" value="Yes"> No <input type="radio" name="Type" value="No" checked></p> <div class="rounded-button"> <input type="submit" value="Search" class="form-submit"></div> <div class="rounded-button"> <input type="submit" value="Map Search" class="form-submit"></div> </form> Any help would be appreciated Thankyou Quote Link to comment Share on other sites More sharing options...
cssfreakie Posted March 15, 2011 Share Posted March 15, 2011 You will need javascript for this. Where the radiobutton triggers a function that set for instance a div to display. I think Jquery would be the easiest way to acccomplish this. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.