This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
How do you set the selection of the radio button that work both for IE and Netscape. <form name="forname" action="any.do"> <input type="radio" name="obj" id="objID" value="0"></html:radio > <input type="radio" name="obj" id="objID" value="1"></html:radio > <input type="radio" name="obj" id="objID" value="2"></html:radio > </form >
scenario: current selected radio is 0, i want to change the selection to 2 "changeRadio(2)" thanks
The reference document.formname.obj will reference the radio group. This is a collection of the radio buttons. So the following:
will set the second radio button as the selected button. (Note that this is an array index and has nothing to do with the values of the buttons). hth, bear P.S. I know that this will work in all modern browsers. [ September 23, 2003: Message edited by: Bear Bibeault ]