how can i keep the trained radio checked when the page is load or refreshed?
HTML Code:<script type='text/javascript'> function show_hide(show, hide) { document.getElementById(show).style.display="block"; document.getElementById(hide).style.display="none"; } </script> <input type="radio" name="relationship" value="trained" onClick="show_hide('trained', 'tutor')" checked /> Trained <input type="radio" name="relationship" value="tutor" onClick="show_hide('tutor', 'trained')" /> Tutor <div id="trained" style="padding-top: 10px; display: block;"> I was trained by: <input type="text" class='input_text' id='username1' name="username1" size="30" value="{$user_name1}" tabindex="0" /> </div> <div id="tutor" style="padding-top: 10px; display: none;"> I was the tutor of: <input type="text" class='input_text' id='username2' name="username2" size="30" value="{$user_name2}" tabindex="0" /> </div>



Reply With Quote

Bookmarks