Hey Saiena,
you are using different variables for teh array og elements and for the
count.
Make it:
var count = formarray.length;
this should do ;o)
But in your case .. why don't you us $A ??
e.g:
var count = $A(document.getElementsByClassName
('nmd_upload_iframetype')).length;
hf
Bastian
On 8/3/07, saiena <[EMAIL PROTECTED]> wrote:
>
>
> I could really use some help with the proper syntax to access the
> values returned by
> getElementsByClassName (and similar functions):
>
> My HTML code includes several forms with a specific class:
> <form class="nmd_upload_iframetype" id="file_upload_8" ...>
> etc...
> </form>
>
> I've included prototype.js, and am running the following code:
>
> var formarray =
> document.getElementsByClassName('nmd_upload_iframetype');
> var count = form.length;
> document.write(count);
> This code prints '0'
>
> Any advice will be appreciated.
>
>
> >
>
--
--
spread the word ... see www.browsehappy.com ;o)
Calvin: Weekends don't count unless you spend them doing something
completely pointless.
Join the Greater IBM Connection (
http://www.xing.com/premiumgroup-6291.d26b7d)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---