Is there way to tell if a radio button is checked by not using the value at all?? And by not using any javascript either..

Here is what Im using:

<input type="radio" name="item_id" value="1" />
<input type="radio" name="item_id" value="1" />

Now I need the name and value to stay like that.. Is it possible to see which is checked?

Recommended Answers

All 2 Replies

Member Avatar for langsor

There are two ways to tell if a radio button is checked ...
1) submit the form and see what value the name or id contains
2) test the radio button-set with javascript

so to answer your question -- no

What you could do is create the event in JavaScript, with the control being
in the server side. You could do that by closing the object in a span an
firing a function in the onclick of the span or the object that you have
your checkbox in.

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.