how can i retrieve value of a radio button (h:selectOneRadio) in a h ataTable using javascript?
Jys<br /><a href="http://jy-s.com" target="_blank" rel="nofollow">http://jy-s.com</a><br /> <br />Trying my very best to learn java, please forgive me if i'm asking some really stupid questions.
The same way you do it without using JSF. Only the ID is going to be JSF specific. So if you have a form id of "myForm" and a radio button as "myRadio" you would use
Jys<br /><a href="http://jy-s.com" target="_blank" rel="nofollow">http://jy-s.com</a><br /> <br />Trying my very best to learn java, please forgive me if i'm asking some really stupid questions.
Jys<br /><a href="http://jy-s.com" target="_blank" rel="nofollow">http://jy-s.com</a><br /> <br />Trying my very best to learn java, please forgive me if i'm asking some really stupid questions.
document.getElementById("budgetcategoryform:active")[0].checked should also work.
Both of above expressions return boolean value.
You can use [1] index also in case you want to. [0]th element refers to first button and [1]th element refers to second button.
P.S. Jolie, if you can format your second post, the readability of the page can be improved. Currently page is bit stretched out. [ September 13, 2005: Message edited by: Varun Khanna ]
hey, thanks.. it works...but somehow when i trid the one with getElementById, it doesn't work...
oops..sorry...
i post it in the "code" tag....
[ September 14, 2005: Message edited by: Jolie Lee ] [ September 14, 2005: Message edited by: Jolie Lee ]
Jys<br /><a href="http://jy-s.com" target="_blank" rel="nofollow">http://jy-s.com</a><br /> <br />Trying my very best to learn java, please forgive me if i'm asking some really stupid questions.
Hi,
I know this is an old post, but now i need the same requirement. As solution is not posted here, please let me know how we can get a selected radio button value in the javascript. Thanks in advance.
document.getElementById("budgetcategoryform:active")[0].checked
should also work.
Both of above expressions return boolean value.
You can use [1] index also in case you want to. [0]th element refers to first button and [1]th element refers to second button.
P.S. Jolie, if you can format your second post, the readability of the
page can be improved. Currently page is bit stretched out.
[ September 13, 2005: Message edited by: Varun Khanna ]