Re: [jQuery] Form plugin revisited ;-)

2006-10-17 Thread Mike Alsup
> Thanks for catching that! I totally missed that the 'get's weren't > working and that the 'get' was not augmenting the url. I'll have to > improve my unit tests! > > I'll be committing the form plugin to svn within the next day or two. All, The form plugin has been updated in svn. It now inc

Re: [jQuery] Form plugin revisited ;-)

2006-10-15 Thread Mike Alsup
Klaus, Thanks for catching that! I totally missed that the 'get's weren't working and that the 'get' was not augmenting the url. I'll have to improve my unit tests! I'll be committing the form plugin to svn within the next day or two. Thanks again. Mike > jQuery.fn.ajaxSubmit = function(tar

Re: [jQuery] Form plugin revisited ;-)

2006-10-15 Thread Klaus Hartl
Hi Mike, if I use the following snippet: var formIdSelector = '#hijax-me'; $(formIdSelector).ajaxForm(formIdSelector); on a form with GET method it still posts the data. I changed ajaxSubmit to this to make it work: (http://stilbuero.de/demo/jquery/hijax.html http://stilbuero.de/demo/jquery/fo

Re: [jQuery] Form plugin revisited ;-)

2006-10-13 Thread Aaron Heimlich
On 10/13/06, Mike Alsup <[EMAIL PROTECTED]> wrote: Great question, Aaron,The ":input" selector will grab all elements and then filter themusing a regex match of the nodeName against"input|select|textarea|button".  On the other hand, the "input,textarea,select,button" selector will grab only those e

Re: [jQuery] Form plugin revisited ;-)

2006-10-13 Thread Mike Alsup
> How does jQuery(':input', this) differ from > jQuery('input,textarea,select,button', this) ? Great question, Aaron, The ":input" selector will grab all elements and then filter them using a regex match of the nodeName against "input|select|textarea|button". On the other hand, the "input,textare

Re: [jQuery] Form plugin revisited ;-)

2006-10-13 Thread Aaron Heimlich
On 10/13/06, Mike Alsup <[EMAIL PROTECTED]> wrote: jQuery.fn.formToArray = function(semantic) {var a = [];var q = semantic ? ':input' : 'input,textarea,select,button';jQuery(q, this).each(function() {How does jQuery(':input', this) differ from jQuery('input,textarea,select,button', this

Re: [jQuery] Form plugin revisited ;-)

2006-10-13 Thread Mike Alsup
> That looks pretty nice. But you would still need some way to return the > jQuery object for use in a pre-callback. I need that to integrate my > validation stuff with the form plugin :-) Yes, the pre-submit callback is invoked from the ajaxSubmit() method and it will be passed the array and the

Re: [jQuery] Form plugin revisited ;-)

2006-10-13 Thread Jörn Zaefferer
Mike Alsup schrieb: > Jörn, > > I see negligible performance gains using $(:input, ctx) vs the current > $('*:not(option)', ctx), however it does make the code cleaner because > I can get rid of the 'ok' array. > > formToArray now looks like this: [...] > That looks pretty nice. But you would st

Re: [jQuery] Form plugin revisited ;-)

2006-10-13 Thread Jörn Zaefferer
Olivier Percebois-Garve schrieb: > I'm quite interested in stuffs related to forms (I wrote a little form > validation jquery plugin before to discover the existing one) > but I did not found anything about ajax file upload. > I know the 'ajax file upload' in itself is impossible (no access to >

Re: [jQuery] Form plugin revisited ;-)

2006-10-13 Thread Mike Alsup
Jörn, I see negligible performance gains using $(:input, ctx) vs the current $('*:not(option)', ctx), however it does make the code cleaner because I can get rid of the 'ok' array. formToArray now looks like this: jQuery.fn.formToArray = function(semantic) { var a = []; var q = semantic

Re: [jQuery] Form plugin revisited ;-)

2006-10-13 Thread Olivier Percebois-Garve
HiI'm quite interested in stuffs related to forms (I wrote a little form validation  jquery plugin before to discover the existing one)but I did not found anything about ajax file upload.I know the 'ajax file upload' in itself is impossible (no access to filesystem), but there is some solutions wit

Re: [jQuery] Form plugin revisited ;-)

2006-10-13 Thread Mike Alsup
> An alternative to the above extended array/objects would be to just pass the > jQuery object > that contains all form elements as a second parameter to the pre-callback. > The validation > could then access all form elements and use the validation rules within the > elements to > check the ent

Re: [jQuery] Form plugin revisited ;-)

2006-10-13 Thread Jörn Zaefferer
Original-Nachricht Datum: Fri, 13 Oct 2006 11:57:41 +0100 Von: "Sam Collett" <[EMAIL PROTECTED]> An: "jQuery Discussion." Betreff: Re: [jQuery] Form plugin revisited ;-) > On 13/10/06, "Jörn Zaefferer" <[EMAIL PROTECTED]> wrote

Re: [jQuery] Form plugin revisited ;-)

2006-10-13 Thread Sam Collett
On 13/10/06, "Jörn Zaefferer" <[EMAIL PROTECTED]> wrote: > An idea to boost the performance of the formToArray method while retaining > order: > $('*', context).filter(':input')... > > -- Jörn That would remove textarea's and buttons though (or does :input already take that into account?) Would

Re: [jQuery] Form plugin revisited ;-)

2006-10-13 Thread Jörn Zaefferer
> These last two items may cause issues for some but to me they are far > more intuitive than what we currently have and I think the discussions > earlier this week were leading in this direction. Currently, the form > plugin's "serialize" method returns an array of objects and core's > "serialize

Re: [jQuery] Form plugin revisited ;-)

2006-10-12 Thread Karl Swedberg
On Oct 12, 2006, at 7:14 PM, Mike Alsup wrote: > On a final note, I've updated the demo page to include a link to run > the unit tests. If some of you Safari users could run the unit tests > I would appreciate it. > > Demo page: http://malsup.com/jquery/form/ > Unit test: http://malsup.com/jquery

[jQuery] Form plugin revisited ;-)

2006-10-12 Thread Mike Alsup
I've updated the form plugin once again to fix a bug in ajaxSubmit which I found while unit testing. I thought I'd take this opportunity to summarize the changes made recently: 1. Incorporated Matt Grimm's optimized serialization code. 2. Defaulted the form method to 'GET' per Klaus's suggestion.