kiazoe
12-12-2005, 08:01 AM
Hi all,
Problem: I have a cgi webpage which creates a list of checkboxes - they are a list of directories. These are named dynamically (by foldername/subfoldername/etc) I am looking to have the subfolders disable when the parent directory is clicked.
I have a very basic code at the minute just so i can test the functionality of the onchange, document.formname.checkboxname.disabled="true" and i know that this works.
Example, i have some a folder called 'English' and it has a subdirectory called English\Other (the \ is there because it is a directory structure, i know this causes problems but i'm not sure of the workaround, i have tried English\\Other but to no avail)
Error: illegal character
Source Code:
swap(this.form.Arabic\ACSAP.checked)
Above is an example of the error i recieve when trying to automatically disable a subfolder by name.
This is only the first part of my problem. Because the checkboxe names are not static I cannot state exactly what to disable. One thing which relates the checkboxes to their parent checkbox is the start of the name. I have looked at using GetEntityId and a regular expression to search for the current folder name + anything but am not sure how to go about even starting this (i'm an amateur at javascript)
It's quite difficult to explain but hopefully that makes sense to someone :) - i unfortunately can't link you to an example as the page is on an internal network.
Thanks in advance,
Eoin.
Problem: I have a cgi webpage which creates a list of checkboxes - they are a list of directories. These are named dynamically (by foldername/subfoldername/etc) I am looking to have the subfolders disable when the parent directory is clicked.
I have a very basic code at the minute just so i can test the functionality of the onchange, document.formname.checkboxname.disabled="true" and i know that this works.
Example, i have some a folder called 'English' and it has a subdirectory called English\Other (the \ is there because it is a directory structure, i know this causes problems but i'm not sure of the workaround, i have tried English\\Other but to no avail)
Error: illegal character
Source Code:
swap(this.form.Arabic\ACSAP.checked)
Above is an example of the error i recieve when trying to automatically disable a subfolder by name.
This is only the first part of my problem. Because the checkboxe names are not static I cannot state exactly what to disable. One thing which relates the checkboxes to their parent checkbox is the start of the name. I have looked at using GetEntityId and a regular expression to search for the current folder name + anything but am not sure how to go about even starting this (i'm an amateur at javascript)
It's quite difficult to explain but hopefully that makes sense to someone :) - i unfortunately can't link you to an example as the page is on an internal network.
Thanks in advance,
Eoin.