You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jeevan Kumar Kade <je...@yahoo.com> on 2007/02/08 05:02:09 UTC
How to hold values in html:radio Button Group using Java Script
Hi All,
I have 2 Radio Button Group
How can i call the following html:radio code in javascript
html:radio code
First Radio Button Group
<html:radio property="firstRadioGroup" value="0"/>
<html:radio property="firstRadioGroup" value="1"/>
Second Radio Button Group
<html:radio property="secondRadioGroup" value="0"/>
<html:radio property="secondRadioGroup" value="1"/>
<html:radio property="secondRadioGroup" value="2"/>
<html:radio property="secondRadioGroup" value="3"/>
<html:radio property="secondRadioGroup" value="4"/>
Here, the value type is Integer as it having more than one value. My Question is, If i select one radio button from First Group and other radio button from Second Group. How can i hold those values in the java script.
i am giving sample, how i am trying to get. based on the below code. Kindly give me the correct code.
<javascript>
document.formName.firstRadioGroup.value = "";
document.formName.secondRadioGroup.value = "";
</javascript>
Please give me your help ASAP.
Thanks in Advance
Jeevan
---------------------------------
Access over 1 million songs - Yahoo! Music Unlimited.
Re: How to hold values in html:radio Button Group using Java Script
Posted by Musachy Barroso <mu...@gmail.com>.
There a lot of different ways, simplest one:
var val = document.getElementById("some_id").value;
or dojo.byId("id").value, if you are using Dojo, or $F("id") is you are
using Prototype.
regards
musachy
On 2/7/07, Jeevan Kumar Kade <je...@yahoo.com> wrote:
>
> Hi musachy,
>
> Thanks a lot for your reply.
>
> Your are correct, how to get the values in the javascript.
>
> Kindly please provide me code. Really it will be helpful me a lot. I
> am trying a lot from 3 days.
>
> Please help me
>
> Thanks in Advance
> Jeevan
>
>
> Musachy Barroso <mu...@gmail.com> wrote:
> What do you mean "how can I hold those values in the javascript."? Do
> you
> mean, how to get the values in javascript?
>
> regards
> musachy
>
> On 2/7/07, Jeevan Kumar Kade wrote:
> >
> > Hi All,
> >
> > I have 2 Radio Button Group
> >
> > How can i call the following html:radio code in javascript
> >
> > html:radio code
> >
> > First Radio Button Group
> >
> >
> >
> >
> > Second Radio Button Group
> >
> >
> >
> >
> >
> >
> >
> > Here, the value type is Integer as it having more than one value. My
> > Question is, If i select one radio button from First Group and other
> radio
> > button from Second Group. How can i hold those values in the java
> script.
> >
> > i am giving sample, how i am trying to get. based on the below
> > code. Kindly give me the correct code.
> >
> >
> > document.formName.firstRadioGroup.value = "";
> > document.formName.secondRadioGroup.value = "";
> >
> >
> > Please give me your help ASAP.
> >
> > Thanks in Advance
> >
> > Jeevan
> >
> >
> >
> >
> >
> >
> >
> > ---------------------------------
> > Access over 1 million songs - Yahoo! Music Unlimited.
>
>
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>
>
>
> ---------------------------------
> Now that's room service! Choose from over 150,000 hotels
> in 45,000 destinations on Yahoo! Travel to find your fit.
--
"Hey you! Would you help me to carry the stone?" Pink Floyd
Re: How to hold values in html:radio Button Group using Java Script
Posted by Jeevan Kumar Kade <je...@yahoo.com>.
Hi musachy,
Thanks a lot for your reply.
Your are correct, how to get the values in the javascript.
Kindly please provide me code. Really it will be helpful me a lot. I am trying a lot from 3 days.
Please help me
Thanks in Advance
Jeevan
Musachy Barroso <mu...@gmail.com> wrote:
What do you mean "how can I hold those values in the javascript."? Do you
mean, how to get the values in javascript?
regards
musachy
On 2/7/07, Jeevan Kumar Kade wrote:
>
> Hi All,
>
> I have 2 Radio Button Group
>
> How can i call the following html:radio code in javascript
>
> html:radio code
>
> First Radio Button Group
>
>
>
>
> Second Radio Button Group
>
>
>
>
>
>
>
> Here, the value type is Integer as it having more than one value. My
> Question is, If i select one radio button from First Group and other radio
> button from Second Group. How can i hold those values in the java script.
>
> i am giving sample, how i am trying to get. based on the below
> code. Kindly give me the correct code.
>
>
> document.formName.firstRadioGroup.value = "";
> document.formName.secondRadioGroup.value = "";
>
>
> Please give me your help ASAP.
>
> Thanks in Advance
>
> Jeevan
>
>
>
>
>
>
>
> ---------------------------------
> Access over 1 million songs - Yahoo! Music Unlimited.
--
"Hey you! Would you help me to carry the stone?" Pink Floyd
---------------------------------
Now that's room service! Choose from over 150,000 hotels
in 45,000 destinations on Yahoo! Travel to find your fit.
Re: How to hold values in html:radio Button Group using Java Script
Posted by Musachy Barroso <mu...@gmail.com>.
What do you mean "how can I hold those values in the javascript."? Do you
mean, how to get the values in javascript?
regards
musachy
On 2/7/07, Jeevan Kumar Kade <je...@yahoo.com> wrote:
>
> Hi All,
>
> I have 2 Radio Button Group
>
> How can i call the following html:radio code in javascript
>
> html:radio code
>
> First Radio Button Group
>
> <html:radio property="firstRadioGroup" value="0"/>
> <html:radio property="firstRadioGroup" value="1"/>
>
> Second Radio Button Group
>
> <html:radio property="secondRadioGroup" value="0"/>
> <html:radio property="secondRadioGroup" value="1"/>
> <html:radio property="secondRadioGroup" value="2"/>
> <html:radio property="secondRadioGroup" value="3"/>
> <html:radio property="secondRadioGroup" value="4"/>
>
> Here, the value type is Integer as it having more than one value. My
> Question is, If i select one radio button from First Group and other radio
> button from Second Group. How can i hold those values in the java script.
>
> i am giving sample, how i am trying to get. based on the below
> code. Kindly give me the correct code.
>
> <javascript>
> document.formName.firstRadioGroup.value = "";
> document.formName.secondRadioGroup.value = "";
> </javascript>
>
> Please give me your help ASAP.
>
> Thanks in Advance
>
> Jeevan
>
>
>
>
>
>
>
> ---------------------------------
> Access over 1 million songs - Yahoo! Music Unlimited.
--
"Hey you! Would you help me to carry the stone?" Pink Floyd