[ 4 posts ]

Dmitri Snytkine

  • Username: lampcms.com
  • Joined: Thu Aug 27, 2009 6:04 am
  • Posts: 94
  • Location: Poconos, PA
  • Twitter: snytkine
  • GitHub: snytkine
  • Gists: snytkine
  • Offline
  • Profile
Tags:

Having problem with YUI3 Node wrapping FORM

Post Posted: Mon Nov 15, 2010 6:16 am
+0-
Can someone help me with getting the value of form's Node
the form is object Node
I need to get the textarea which is the element with name 'mbody'
This does not work:

form.get('elements').get('mbody');

What is the correct way to get one input element from the form?

Luke Smith

YUI Contributor

  • Username: lsmith
  • Joined: Thu Aug 28, 2008 7:50 am
  • Posts: 507
  • Location: Sunnyvale
  • Twitter: ls_n
  • GitHub: lsmith
  • Gists: lsmith
  • IRC: ls_n
  • YUI Developer
  • Offline
  • Profile

Re: Having problem with YUI3 Node wrapping FORM

Post Posted: Mon Nov 15, 2010 10:44 am
+0-
Try form.one("textarea[name=mbody]").get("value");

Dmitri Snytkine

  • Username: lampcms.com
  • Joined: Thu Aug 27, 2009 6:04 am
  • Posts: 94
  • Location: Poconos, PA
  • Twitter: snytkine
  • GitHub: snytkine
  • Gists: snytkine
  • Offline
  • Profile
Tags:

Re: Having problem with YUI3 Node wrapping FORM

Post Posted: Mon Nov 15, 2010 3:09 pm
+0-
Ouch! This works, but I would have never guessed to do it this way.

Luke Smith

YUI Contributor

  • Username: lsmith
  • Joined: Thu Aug 28, 2008 7:50 am
  • Posts: 507
  • Location: Sunnyvale
  • Twitter: ls_n
  • GitHub: lsmith
  • Gists: lsmith
  • IRC: ls_n
  • YUI Developer
  • Offline
  • Profile
Tags:

Re: Having problem with YUI3 Node wrapping FORM

Post Posted: Mon Nov 15, 2010 3:49 pm
+0-
There are also a few good form utilities in the Gallery. Check out (at least) AlloyUI's Form Validator (http://yuilibrary.com/gallery/show/aui-form-validator)
  [ 4 posts ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum