Re: [jQuery] hoe to get attributes?

2006-09-17 Thread Olivier Percebois-Garve
Hi John thanks for your code I solved the attr('name') issue (I was fooled by the reloading) and I've done a little form checker plugin in a few hours, thanks to jquery ! Is there a similar project known in the community ? olivvv John Resig wrote: Oliver - Please make sure that you're usi

Re: [jQuery] hoe to get attributes?

2006-09-17 Thread John Resig
Oliver - Please make sure that you're using jQuery 1.0.1: http://jquery.com/src/jquery-1.0.1.js --John On 9/17/06, Olivier Percebois-Garve <[EMAIL PROTECTED]> wrote: > > Wow lots of answers thanks ;) > Unfortunatly this.attr('name') or this.attr('id') are breaking the code. > (No js error but

Re: [jQuery] hoe to get attributes?

2006-09-17 Thread Klaus Hartl
Olivier, this.attr('name') $(this.id) In the first line you are trying to call the attr method on a DOM node (which is not defined), in the second you are passing a string (the id of the element this refers to) to the $ function, which returns an empty jQuery object, because there is element w

Re: [jQuery] hoe to get attributes?

2006-09-17 Thread Olivier Percebois-Garve
Wow lots of answers thanks ;) Unfortunatly this.attr('name') or this.attr('id') are breaking the code. (No js error but just nothing working anymore) Klaus Hartl wrote: Onno Timmerman schrieb: Olivier Percebois-Garve schreef: Hi It seems that there is cases where

Re: [jQuery] hoe to get attributes?

2006-09-17 Thread Olivier Percebois-Garve
Seems that you are putting me on the way but $(this.id) outputs [object Object] Onno Timmerman wrote: Olivier Percebois-Garve schreef: Hi It seems that there is cases where it is not possible to get attributes. How to deal with this ? $(this).val() // works $(this).name() //no

Re: [jQuery] hoe to get attributes?

2006-09-17 Thread Jörn Zaefferer
Klaus Hartl schrieb: > If $(...).name()/$(...).id() are not working this is bug and will be > fixed. I added some more tests, name() and id() both work fine. Olivier: Please make sure you are working with an update-to-date version. -- Jörn ___ jQuery

Re: [jQuery] hoe to get attributes?

2006-09-17 Thread Klaus Hartl
Onno Timmerman schrieb: > > Olivier Percebois-Garve schreef: >> Hi >> >> It seems that there is cases where it is not possible to get attributes. >> How to deal with this ? >> $(this).val() // works >> $(this).name() //not working >> $(this).id() //not working > > more like $(this.id); Unfo

Re: [jQuery] hoe to get attributes?

2006-09-17 Thread Onno Timmerman
Olivier Percebois-Garve schreef: > Hi > > It seems that there is cases where it is not possible to get attributes. > How to deal with this ? > $(this).val() // works > $(this).name() //not working > $(this).id() //not working more like $(this.id); > > etc... > > Here is my code : > > $.fn

[jQuery] hoe to get attributes?

2006-09-17 Thread Olivier Percebois-Garve
Hi It seems that there is cases where it is not possible to get attributes. How to deal with this ? $(this).val() // works $(this).name() //not working $(this).id() //not working etc... Here is my code : $.fn.checkform = function() { this.bind("click", function(){