Hello Steven,

Truppe Steven schrieb:
> You are right, i just want to empty all input/textarea fields. I'm
> trying to use the "elements" attribute but i get an error telling me
> that the property is not known:
>
> var x = $("#editarticle/form").elements.length;
>   
In this case, 'x' contains a jQuery-Objekt, not a DOM-element.
> I'm also not able to run the reset() function with:
> $("#editarticle/form").reset();
>
>   
Try this (surely untested, and I'm absolutely *not a pro*):

$("#editarticle/form").each(
  this.reset();
);


If you're sure that only one form matched your expression, this might 
work, too:

var x = $("#editarticle/form") .get(0);
x.reset();

Now x contains a DOM-Element.

There was a nice expalanation of this behaviour on the list some days 
ago (Try a search after posts from Michael Geary)

> Do i refer to the wrong object ? Or how to get the dom properties out of
> an jquery object ? i'm relative new to the javascript thing so i think
> i'm missing some basics.
>
>   
as said look up the posts by Michael, he said something about posting 
something to his Blog about this as well.
> best regards,
> Truppe Steven
>
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/
>   


-- Marc

-- 
========================

 Marc Jansen

  Reuterstraße 112
  53129 Bonn
  0228 / 2438694

  Schwalbenweg 2
  53947 Nett./Engelgau
  02486 / 7644

  [EMAIL PROTECTED]

========================


_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to