[FX.php List] [OFF] A Javascript question

Gjermund Gusland Thorsen ggt667 at gmail.com
Thu Apr 23 10:58:55 MDT 2009


jQuery is somewhat simple, however learning the dos and donts about
div elements... that’s a different story.

ggt

2009/4/23 Bob Patin <bob at patin.com>:
> Michael,
>
> Just the thing; I'll give 'er a shot! I REALLY need to get my jQuery chops
> together--just too much going at one time!
>
> Thanks for the code!
>
> Bob Patin
>
>
>
>
>
> 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
>
> On Apr 22, 2009, at 7:06 PM, Head Honcho wrote:
>
>> Hi Bob,
>>
>> On 23/04/2009, at 8:55 AM, Bob Patin wrote:
>>
>>> 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.
>>>
>> <snip />
>>
>> If it were me, I'd be doing it with jQuery.
>>
>> Here's the full page (sorry about the inline post, I've forgotten the link
>> to the web page to display code snippets)
>>
>> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
>>        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>>
>> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
>> <head>
>>        <meta http-equiv="Content-Type" content="text/html;
>> charset=utf-8"/>
>>        <script src="jquery.js" type="text/javascript"
>> charset="utf-8"></script>
>>
>>        <title>checkboxes</title>
>>        <script type="text/javascript" charset="utf-8">
>>        $(function(){
>>                $(".aCheckbox").click(function(){
>>                        if($(this).is(':checked')){
>>                                alert("checkbox "+this.name + "\nHas a
>> value of "+$(this).val());
>>                                }
>>                        });
>>                });
>>        </script>
>> </head>
>> <body>
>>        <form action="checkboxes.html" method="post"
>> accept-charset="utf-8">
>>                <input type="checkbox" name="thisName" value="1" class =
>> "aCheckbox"> Checkbox 1
>>                <input type="checkbox" name="thisName1" value="2" class =
>> "aCheckbox"> Checkbox 2
>>                <input type="checkbox" name="thisName2" value="3" class =
>> "aCheckbox"> Checkbox 3
>>                <input type="checkbox" name="thisName3" value="4" class =
>> "aCheckbox"> Checkbox 4
>>        </form>
>> </body>
>> </html>
>>
>> You can see this in action at
>> <http:demo.customikesolutions.com/checkboxes.html>
>>
>> if you expand your list of checkboxes, you just need to give them a class
>> of "aCheckbox" (or whatever you call it) and it will "just work".
>>
>> Hope this helps.
>>
>> Regards
>>
>> Michael Ward
>> --
>> Head Honcho
>> CustoMike Solutions
>> Member, FileMaker Business Alliance
>> Member, FileMaker Technical Network
>> FileMaker 7 Certified Developer
>> FileMaker 8 Certified Developer
>> FileMaker 9 Certified Developer
>> 10 Wandoo Crt
>> Wheelers Hill, 3150
>> ph 0414 562 501
>> headhoncho at customikesolutions.com
>>
>>
>>
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
>
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
>
>


More information about the FX.php_List mailing list