Hi
I want to know how can I get the return value from a function into a variable onClick event of a selection of radio button.
Let me explain in detail, I have 3 radio buttons and if i select any one, then I want to call a function to which I pass the value of selected radio button and the function does some processing and then returns some value which i store in a variable.
[CODE=javascript]var returnValue="";
formatButton = "<input type='radio' onClick='return getValue()' value='Radio2' name='btn2'>"
function getValue()
{
return "selected button is 2";
}
[/CODE]
Please let me know how to do this?
Thanks
Ashish
I want to know how can I get the return value from a function into a variable onClick event of a selection of radio button.
Let me explain in detail, I have 3 radio buttons and if i select any one, then I want to call a function to which I pass the value of selected radio button and the function does some processing and then returns some value which i store in a variable.
[CODE=javascript]var returnValue="";
formatButton = "<input type='radio' onClick='return getValue()' value='Radio2' name='btn2'>"
function getValue()
{
return "selected button is 2";
}
[/CODE]
Please let me know how to do this?
Thanks
Ashish
Comment