Answered | Radio lists: default selection?

Forum
Last Post
Threads / Messages

Quillink

Member
Member
Joined
Dec 18, 2008
Messages
93
Points
0
Mysidian Dollar
7,188
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?

Code:
Gender: 
<input type='radio' value='Male' name='gender'>Male   
<input type='radio' value='Female' name='gender'>Female   
<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:

Code:
<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
 
RE: Radio lists: default selection?

For the radio button part:

Code:
<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. :)
 
RE: Radio lists: default selection?

Thanks BMR777, worked like a charm. :)

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

Similar threads

Users who are viewing this thread

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

Threads
4,280
Messages
33,130
Members
1,603
Latest member
Monako
BETA

Latest Threads

Latest Posts

Top