Question About Using JavaScript Within WOCheckboxmatrix

Saikat Kanjilal <[email protected]>
Newsgroups gmane.comp.web.webobjects.general
Message-ID <[email protected]>
Hi:
I have searched around the mailing lists and didn't see anything 
related to this subject.  I have a couple of WORadioButtons on my form, 
I want to be able to iterate through a WOCheckboxmatrix and 
disable/enable a set of checkboxes based on whether the radio buttons 
are checked, I have the following javascript function I wrote:

<SCRIPT LANGUAGE="JAVASCRIPT">
	function checkAllLanguages()
	{
		if (document.page1Form.LanguagesRadioButton[0].checked)
		{
			for (i=0;i<numCheckboxes;i++)
			{
				document.page1Form.languageCheckboxMatrix.item[i].disabled=true;
				document.page1Form.languageCheckboxMatrix.item[i].checked=true;
			}
		}
		else if (document.page1Form.LanguagesRadioButton[1].checked)
		{
			for (i=0;i<numCheckboxes;i++)
			{
				document.page1Form.languageCheckboxMatrix.item[i].disabled=false;
				document.page1Form.languageCheckboxMatrix.item[i].checked=false;
			}
		}		
	}
	</SCRIPT>


However when I check the radio buttons nothing happens, I was wondering 
if this is the correct way to access the elements inside a 
WOCheckboxmatrix.

Any help would be much appreciated, I am a newbie at using this element.

Thank you
Saikat
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.