List Info

Thread: evaluate with array




evaluate with array
country flaguser name
United States
2007-02-25 14:18:22
OK - I'm no guru for sure.  Anybody know how I would do
this?

function ckOptions(opt) {
	var oCt = 0;
	for(i=0;i<eval("document.newComm."+opt+".
length");i++) {
		if(eval("document.newComm."+opt+"[i].select
ed") == true) {
			oCt++;
		}
	}
}

The call to the index is not getting processed .  How can I
do this?

thanks,
Dave

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~|
Create Web Applications With ColdFusion MX7 & Flex 2. 
Build powerful, scalable RIAs. Free Trial
http:
//www.adobe.com/products/coldfusion/flex2/

Archive: http://www.houseoffusion.com/groups/Jav
ascript/message.cfm/messageid:3653
Subscription: http://www.houseoffusion.com/groups/Javascript/subsc
ribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/u
nsubscribe.cfm?user=22184.15789.33

Re: evaluate with array
country flaguser name
United States
2007-02-25 21:57:59
I'd trash the eval and use getElementById().

What is newComm and what is being passed into opt?

On 2/26/07, David Hannum <oujasperseomug.org> wrote:
> OK - I'm no guru for sure.  Anybody know how I would do
this?
>
> function ckOptions(opt) {
>         var oCt = 0;
>        
for(i=0;i<eval("document.newComm."+opt+".l
ength");i++) {
>                
if(eval("document.newComm."+opt+"[i].selected
") == true) {
>                         oCt++;
>                 }
>         }
> }
>
> The call to the index is not getting processed .  How
can I do this?
>
> thanks,
> Dave
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http:
//www.adobe.com/products/coldfusion/flex2/

Archive: http://www.houseoffusion.com/groups/Jav
ascript/message.cfm/messageid:3654
Subscription: http://www.houseoffusion.com/groups/Javascript/subsc
ribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/u
nsubscribe.cfm?user=22184.15789.33

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )