i trying create page initialize geolocation api use. page have 2 radio buttons switch between choices. have created 2 radio buttons so:
<tr> <td colspan="2"> <bean:message key="config.geolocation.page.text"/> </td> </tr> <tr> <td class="odd" width="20%" nowrap> <bean:message key="editvarref.header.geolocation.pick.api"/> </td> <td class="odd" width="80%"> <div> <html:radio styleid="logo_type_0" property="b_type" value="0" onclick="show_logo(false)" /> <label for="b_type_0"><bean:message key="geolocation.use.google"/></label> </div> <div style="padding-top:5px; padding-bottom:5px;"> <html:radio styleid="b_type_1" property="b_type" value="1" onclick="show_logo(true)" /> <label for="bo_type_1"><bean:message key="geolocation.use.skyhook"/></label> </div> </td> </tr> how can modify radio buttons show different input fields user can input values. trying make both radio button show different input fields. when 1 chosen show fields , when other clicked show different fields. fields text box users can input information
script
$(document).ready(function() { $(".text").hide() }); function getresults(elem) { elem.checked && elem.value == "show" ? $(".text").show() : $(".text").hide(); html
<input type="radio" name="radio1" value="show" onclick="getresults(this)"> nothing <input type="radio" name="radio1" value="nothing" onclick="getresults(this)">
Comments
Post a Comment