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

Bob Patin bob at patin.com
Thu Apr 23 10:40:41 MDT 2009


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


-------------- 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/20090423/9b0d5bc2/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

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



More information about the FX.php_List mailing list