Click to See Complete Forum and Search --> : chk box same name with two different values


shanuragu
08-29-2003, 03:11 AM
Hi

I have listed out files & folder names each under a check box with same name "ff". but the value of each check box differs
either by F/D. ie if it is for a file its values starts from F & D otherwise.

I want the users to select only files (chk with value starting from "F"). How can I do this.

Also can any one give me a regular expression for a name starting with "F" only???

shara

Fang
08-29-2003, 07:14 AM
Add the attribute disabled="disabled" to all folder checkboxes.

lillu
08-30-2003, 02:39 PM
Hi,

re.match(/^F/);

Well, 're' is the variable used here and in this case a match must occur at the beginning of the string (see the ^ symbol)and start with an F.

I think JavaScript regular expressions are case-sensitive so it will not accept the letter f even if it occurs at the beginning.

HTH,

Lillu