<form method="post" action="#">
<table>

<tr>

 <td></td>
<td><input name=cars type=radio value=a>Volkeswagon</td>
<td><input name=cars type=radio value=b>Ford</td>
<td><input name=cars type=radio value=c>Honda City</td>
<td><input name=cars type=radio value=d>Renault</td>
</tr>
<tr><td> <input type="submit" value="submit"></td></tr>
</form>

Quoted Text Here

so when i did page refreshing after the radiobutton selection.the radiobutton can display as unchecked.
can u please help me to display the radiobutton as checked even after page refreshing...thanks to all.

if you press browser refresh button it is not possible to retain values.

hi urtrivedi.ya wat you said was right..is it posible for disabling browser refresh button using java script.

You can use HTML5's localStorage/ Cookie if you want it to be retained. you can do the following steps

  1. Passively/Actively save the option value to localStorage/cookie
  2. Refresh
  3. Check which radio button was selected, then put a "checked" tag

Hi ritanji,
It's possible to disable the refresh button. You can filter it on the keydown event, it has a keycode of 116.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.