OK, thanks, I'll give it a shot. If I remember correctly, my tests with jquery's .serialize() and jquery form plugin's .serialize() didn't work unless the selector returned a form. Not sure why: the docs didn't say anything about that not working, but all the examples *were* using form ID's (no examples using selectors that got other set of DOM nodes).

If anyone know otherwise about jquery's .serialize() and jquery form's .serialize(), let me know, plz. Might have been user error, but if that's a restriction, it'd be good to know when deciding which route to take.

- Jack

Dan G. Switzer, II wrote:
Jack,

  
I asked this via another thread, but no reply yet... so tossing it in here,
too. Do you know if *any* selector can be used with .formHash() or just an
id for a form? IE, if I have a few divs inside a form can I use a div id to
just get the formHash for form fields inside that div?
    

If your selector returns multiple form elements, then it will process them.
You can't feed it the <div> directly, but you can do any of the following:
"div > form", "#someElement > form", "form.someClass", ".someClass", "form",
etc, etc.

Whatever jQuery object is passed to the hashForm() method is then filtered
for just form elements. So even if ".someClass" was assigned to various
elements, it uses the filter() method to limit the collection to just form
elements.

-Dan


  

Reply via email to