I have three radios and i want onselect of anyone to be redirected to a link. Using javascript or jquery
All <input name="EventRadio" type="radio" value="" checked="checked"/>
Events<input name="EventRadio" type="radio" value="Events" /> Classes<input name="EventRadio" type="radio" value="Classes"/><br /><br />
so since "All" is default checked, i want it to go to mysite.com/search.aspx. now if user selects Events, I want to redirect user to mysite.com/search?type=Events or if user selects Classes, I want to redirect the user to mysite.com/search?type=Classes as response to the onselect of the radios. How do I achieve this?
All <input name="EventRadio" type="radio" value="" checked="checked" onclick ="goToLocation(this.value)"/>
Events <input name="EventRadio" type="radio" value="Events" onclick ="goToLocation(this.value)"/>
Classes <input name="EventRadio" type="radio" value="Classes" onclick ="goToLocation(this.value)"/><br /><br />
function goToLocation(val){
if(val == "Events")
window.location = "go to Events location";
if(val == "Classes")
window.location = "go to Classes location";
window.location = "go to default location";
}