The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Checking if Radio Button is Selected

How do I check if a radio button is selected or not, for example, if the page loads with the radio button selected, then I want to perform a task. I also want to perform the same task if the radio button is selected after the page is loaded.

Thanks for that. I imagine I'd call that function directly after my radio button. I'll also include an onchange or onclick event which will also trigger it, that way it should work both on load, and when the user plays around with the radio buttons.