Re: SOT: Select at least one select

2011-05-02 Thread Jason Fisher

(in JavaScript, called on the form tag:  )

function validateMyForm(frm) {
var selectTest = false;

if (frm.select1.selectedIndex > 0) {
 var selectTest = true;
} else if (frm.select2.selectedIndex > 0) {
 var selectTest = true;
} else if 

if (!selectTest) {
 alert("You must select at least one drop-down option to continue.");
 return false;
} else {
 return true;
}

On 5/2/2011 6:18 AM, Kevin Parker wrote:
> Have an interesting problem that no end of trawling the net has solved for
> me.
>
> Have a form that has 6 select boxes on it. I want to check that the user has
> selected at least one option from any of the six select boxes (doesn't
> matter which one but must be at least one from any dropdown). Unfortunately
> its running on a plain old web server - no smarts and no elegance like CFML
> to the rescue so I figure JavaScript is my friend but have been unable to
> uncover any examples of how this might be achieved (if it can).
>
> Has anyone seen anything like this and can point me in the right direction
> -thank you!!!
>
> TIA!!!
>
>
> ++
> Kevin Parker
> Advanced Imaging
>
> e: webmas...@advancedimaging.com.au
> w: www.advancedimaging.com.au
> m: 0418 815 527
>
> ++
>
> http://au.linkedin.com/in/krparker
>
>
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:344118
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


SOT: Select at least one select

2011-05-02 Thread Kevin Parker

Have an interesting problem that no end of trawling the net has solved for
me. 

Have a form that has 6 select boxes on it. I want to check that the user has
selected at least one option from any of the six select boxes (doesn't
matter which one but must be at least one from any dropdown). Unfortunately
its running on a plain old web server - no smarts and no elegance like CFML
to the rescue so I figure JavaScript is my friend but have been unable to
uncover any examples of how this might be achieved (if it can).

Has anyone seen anything like this and can point me in the right direction
-thank you!!!

TIA!!!


++
Kevin Parker
Advanced Imaging

e: webmas...@advancedimaging.com.au
w: www.advancedimaging.com.au
m: 0418 815 527

++

http://au.linkedin.com/in/krparker



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:344117
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm