dcsimg
Using document.getelementByxxx(..)
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Muhammad_Qureshi
Posted On:   Wednesday, October 19, 2005 01:44 PM

Hi I want to use the value of selected radio button in one function. how do I get the value because document.getElementById('...') dont seem to work. it always returns the value of first radio button even if second is selected. Here is what I am doing and then trying to use the value in the folowing code (document.getElementById('privacyOption').value); but it always returns the first value that is 1. the name of this form and property fax (which is java class Fax)is configured in struts-config.xml. I know possible solution is to iterate but can anyone please tell me how. because group name would be what. and I am accessing all this in a javascript function.    More>>

Hi I want to use the value of selected radio button in one function. how do I get the value because document.getElementById('...') dont seem to work. it always returns the value of first radio button even if second is selected.
Here is what I am doing






and then trying to use the value in the folowing code


(document.getElementById('privacyOption').value);


but it always returns the first value that is 1.

the name of this form and property fax (which is java class Fax)is configured in struts-config.xml. I know possible solution is to iterate but can anyone please tell me how. because group name would be what. and I am accessing all this in a javascript function.
Thanks

   <<Less

Re: Using document.getelementByxxx(..)

Posted By:   Almagest_FUTT  
Posted On:   Thursday, October 20, 2005 08:35 AM

Where are you declaring that the input's attribute "id" shall have the value "privacyOption" ? (for that is how it should be for getElementById() to work)
About | Sitemap | Contact