Yes, use the radio buttons by all means. But if it's worth breaking it using their own local HTML file that submits data to yours then they probably will do the unexpected.
If it's "vote for your fave colour", it's no problem. But, if it's vote for your next MP then it's a problem. - Peter -----Original Message----- From: James Buckingham [mailto:[EMAIL PROTECTED] Sent: 26 March 2004 15:07 To: '[EMAIL PROTECTED]' Subject: RE: [ cf-dev ] Cold Fusion/Form awareness Only problem with that one is that I need them to just select one checkbox. If I went with that idea would it not allow them to select multiple? -----Original Message----- From: Peter Harrison [mailto:[EMAIL PROTECTED] Sent: 26 March 2004 15:00 To: [EMAIL PROTECTED] Subject: RE: [ cf-dev ] Cold Fusion/Form awareness I would have gone for this one, as it should not require JavaScript. But worst case you might end up with a list of values in the same string if more than one box was checked. (also rusty, worth trying it out) - Peter -----Original Message----- From: Douglas Humphris [mailto:[EMAIL PROTECTED] Sent: 26 March 2004 14:55 To: [EMAIL PROTECTED] Subject: RE: [ cf-dev ] Cold Fusion/Form awareness Another way is to set the name of all the checkboxes the same (a la Radio boxes). Then give all the checkboxes a value attribute and put the appropriate value in each. All checkboxes that are checked will appear in a list. So if my checkboxes are all called myVote, then form.myVote will contain a list of all the checked boxes. Haven't done this for ages, but pretty sure it's possible... <input type="checkbox" name="myVote" value="Tony Blair" /> <input type="checkbox" name="myVote" value="John Major" /> <input type="checkbox" name="myVote" value="Margaret Thatcher" /> Douglas -----Original Message----- From: Nick de Voil [mailto:[EMAIL PROTECTED] Sent: 26 March 2004 14:34 To: [EMAIL PROTECTED] Subject: Re: [ cf-dev ] Cold Fusion/Form awareness Yup. ----- Original Message ----- From: "James Buckingham" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, March 26, 2004 2:28 PM Subject: RE: [ cf-dev ] Cold Fusion/Form awareness > God that was quick :) > > So you're saying I should use JS to add the value selected to a hidden field > and get Cold Fusion to just run the query from that instead? > > Cheers, > James > > > > > -----Original Message----- > From: Nick de Voil [mailto:[EMAIL PROTECTED] > Sent: 26 March 2004 14:21 > To: [EMAIL PROTECTED] > Subject: Re: [ cf-dev ] Cold Fusion/Form awareness > > 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] > > -- > 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] > > > -- 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] -- 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] -- 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] -- 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] -- 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]
