problem with getElements, getInputs in Prototype

terencexuan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Thu, 28 Jun 2007 07:36:26 -0000

I''ve following code:

<script src="javascripts/prototype.js"
type="text/javascript"></
script>


  <input type="text" id="username"
name="username" value="abc" />



  var form = $(''user'');
  var a = form.getElements();
  alert(a);


what pops up is [object] in IE, and [object HTMLInputElement] in
Firefox

what went wrong???

Thanks.


--~--~---------~--~----~------------~-------~--~----~
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
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---