That's the ticket ;)

Thanks Paul!

bob
 
-----Original Message-----
From: Paul Kukiel [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 17, 2008 8:54 AM
To: CF-Newbie
Subject: Re: OT JavaScript help

<p align=\"left\"><b><font face=\"Arial\" size=\"2\">GFI MailSecurity's
HTML threat engine found HTML scripts in this email and has disabled
them.</font></b></p>Hi Robert,

Try this:

function checkDaBoxes(){

   for (i=0; i<document.test.checkgroup.length; i++){

     if (document.test.checkgroup[i].checked &&  
document.test.checkgroup[i].value == 'bob')

       alert("Its Bobby")

     }
}

Paul.


On 17/06/2008, at 10:28 PM, Imperial, Robert wrote:

> Hello folks,
>
>
>
> Trying to get my head around how to find a specific value of a  
> checkbox
> that has been checked here but I'm not getting it just yet. Below is
> what I've been playing with trying to figure out the correct syntax to
> pull this off. I only want to see if "bob" is checked then do some  
> other
> processing based on that. What I have here obviously doesn't work the
> way I hoped it would as it pops the alert no matter which one is
> checked. TIA
>
>
>
> <form name="test" action="dump.cfm" Xonsubmit="return
checkDaBoxes();">
>
> <input type="checkbox" name="checkgroup" value="bob" />
>
> <input type="checkbox" name="checkgroup" value="tom" />
>
> <input type="checkbox" name="checkgroup" value="mary" />
>
> <input type="submit" />
>
> </form>
>
>
>
> <Xcript type="text/javascript"><!--
>
> function checkDaBoxes(){
>
> for (i=0; i<document.test.checkgroup.length; i++){
>
> if (document.test.checkgroup[i].value == 'bob')
>
> alert("It's bob")
>
> }
>
> }
>
> --></Xcript>
>
>
>
> Bob
>
>
>
>
>
> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:3758
Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15

Reply via email to