views:

194

answers:

2

Is it possible with Javascript to hide the checked-status of a radio button so that on a form submit the submit-request fails b/c of missing information?

For example: I have a group of radio buttons

<form action="?modul=daDaaaah&subModul=someCoolThingy" method="post">
    <input type="radio" name="mygroup" id="nod_1" value="great" />
    <input type="radio" name="mygroup" id="nod_2" value="greater" />
    <input type="radio" name="mygroup" id="nod_3" value="awesome" />
    <input type="radio" name="mygroup" id="nod_4" value="junk" />
    <input type="radio" name="mygroup" id="nod_5" value="foo" />
    <input type="submit" name="edit" value="Edit" />
</form>

Now I am checking the radio button with the id=1 and by submitting it (dunno whether I got the button correct, but I sorta guess it is correct) the server should get a request where it says mygroup=great (right?).

Now is there a way to have that radio button checked and hidden it at the same time?

I am asking b/c somehow a javascript I am using is supposedly hiding this status (everywhere but in IE) by somehow altering the DOM or what do I know and I can't seem to get the right request nor find the reason why or how it does it.

If I am being unclear, please say so.

EDIT: One javascript that has this effect can be found here http://www.frequency-decoder.com/demo/table-sort-revisited/js/paginate.js but others do so as well :(

EDIT: Changed ID-names. Still doesn't work.

A: 

One thing is you can not have ids that begin with a number. So your radio buttons should be something like rad1, rad2, etc.

epascarello
thnx for the hint. changed that, but the problem still remains :(
doro
A: 

If the radio has disabled="true" then the value will not be present in the request so you could check for that.

Chris R
you mean the script is disabling the buttons? then this would seriously be a weird 'pagination'-script ... but I'll see if I can find a hint in the src
doro