PDA

View Full Version : Answered | Radio lists: default selection?


Quillink
01-24-2010, 07:38 AM
I've been googling the topic for hours but I can't seem to get my radio list to have a default selection. Here's the section of the code, can someone show me how to have "Undisclosed" selected when the page loads?

Gender:
<input type='radio' value='Male' name='gender'>Male &nbsp;
<input type='radio' value='Female' name='gender'>Female &nbsp;
<input type='radio' value='Undisclosed' name='gender'>Undisclosed



Also does anyone know how to get this working? It's the refresh button for my CAPTCHA and I'm really not sure where to start:

<a href='#' onclick='document.getElementById('captcha').src = '/securimage/securimage_show.php?' + Math.random(); return false'><img border='0' src='secureimage/images/refresh.gif'></a>


Thanks in advance,
- Quillink

BMR777
01-24-2010, 09:35 AM
For the radio button part:

<input type='radio' value='Undisclosed' name='gender' checked>Undisclosed

Just add the word checked in there. :)

Unfortunately I can't help much with the CAPTCHA refresh as Javascript is not my area. :)

Quillink
01-24-2010, 09:48 AM
Thanks BMR777, worked like a charm. :)

EDIT: Don't worry about the second question, I figured out the reason.