If you're relying on JavaScript anyway, why not set the value of a hidden
form variable at that point & get CF to look at that instead?

Nick

----- Original Message -----
From: "James Buckingham" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 26, 2004 2:21 PM
Subject: [ cf-dev ] Cold Fusion/Form awareness


> Hi guys,
>
> I'm wondering if there is an easier way to do this.
>
> I'm trying to create a voting system which will be used to record the
votes
> of our site's visitors. The form contained 18 checkboxes and a drop down
> menu which are passed to a Cold Fusion script and then processed. The only
> thing is that the visitor is only allowed to select one checkbox or an
> option from the dropdown (which is controlled through a JavaScript).
>
> What I need to do is run through all 18 of the checkboxes and find out
which
> one was selected (if there was one).
>
> I'd rather not use a long/18 IF statement(s) to do this so I'm wondering
if
> there was an easier way of doing this.
>
> A CFLOOP maybe?
>
> Here's the idea of what I'm trying to do
>
> 1)       Find out which checkbox was selected or if it was the select drop
> down.
>
> 2)       Get the value from the select element (Each checkbox is called
> 'checkbox1', 'checkbox2', 'checkbox3' etc. with the same numerical value).
>
> 3)       Run a query on the database to update the record relating to the
> selection.
>
> Appreciate any help you can give me on this one.
>
> Cheers,
> James
>




-- 
These lists are syncronised with the CFDeveloper forum at 
http://forum.cfdeveloper.co.uk/
Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
 
CFDeveloper Sponsors and contributors:-
*Hosting and support provided by CFMXhosting.co.uk* :: *ActivePDF provided by 
activepdf.com*
      *Forums provided by fusetalk.com* :: *ProWorkFlow provided by proworkflow.com*
           *Tutorials provided by helmguru.com* :: *Lists hosted by gradwell.com*

To unsubscribe, e-mail: [EMAIL PROTECTED]

Reply via email to