[FX.php List] [OFF] A Javascript question
Bob Patin
bob at patin.com
Wed Apr 22 16:55:20 MDT 2009
I have a Javascript question:
I have a table that builds rows, each of which with a checkbox.
There are 2 checkbox rows that I want to monitor, and if they check
either of them, show an alert to them.
I know that when the page loads, the 2 checkboxes in question are
going to get the NAMEs of "item3" and "item4", but I'd rather not have
to hard-code my javascript function, in case we change the database
and insert records that throw this all out of whack.
So what I was hoping was to pass a variable to the function, the
variable NAME (which for the two rows in question would be "item3" or
"item4".
No problem so far... I can do that easily enough.
BUT...
How do I construct this statement using the variable (whose name is
WHICH):
alert(document.form1.WHICH.checked);
Is there a way to write that ALERT so that it will return the state of
the checkbox that has been checked? The only way I've gotten it to
work is to hard-code it like this:
alert(document.form1.item3.check);
But then what if my client inserts a record that now makes item3
become item4, and so on...
Anyway, if anyone has any wisdom on this, I'd appreciate it; thanks,
Bob Patin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: new_logo_idea3_120w.jpg
Type: image/jpeg
Size: 15728 bytes
Desc: not available
Url : http://mail.iviking.org/pipermail/fx.php_list/attachments/20090422/496cffd4/new_logo_idea3_120w-0001.jpg
-------------- next part --------------
Longterm Solutions
bob at longtermsolutions.com
615-333-6858
http://www.longtermsolutions.com
iChat: bobpatin
AIM: longterm1954
FileMaker 9 Certified Developer
Member of FileMaker Business Alliance and FileMaker TechNet
--------------------------
FileMaker hosting and consulting for all versions of FileMaker
PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting
More information about the FX.php_List
mailing list