[jQuery] Re: Generating a CSV of values from a bunch of Checkboxes with same id

2010-01-11 Thread Gordon
I think I should point out that you can't have more than one element with the same ID, they are by definition unique. The reason is that the getElementById method depends on there being only one item with the ID passed to it in the DOM. If there is more than one item then behaviour is undefined.

Re: [jQuery] Re: Generating a CSV of values from a bunch of Checkboxes with same id

2010-01-10 Thread Md. Ali Ahsan Rana
$(this).attr('title') -- http://ranacseruet.blogspot.com/ On Mon, Jan 11, 2010 at 11:58 AM, swfobject_fan wrote: > Peter, > > The $(this).getAttribute didn't work for me in any browser. > > I changed it to this: > checkedGenres.push(this.getAttribute('title')); > > But is this a standard meth

[jQuery] Re: Generating a CSV of values from a bunch of Checkboxes with same id

2010-01-10 Thread swfobject_fan
Peter, The $(this).getAttribute didn't work for me in any browser. I changed it to this: checkedGenres.push(this.getAttribute('title')); But is this a standard method? Safer? -guru On 9 Jan, 20:30, Peter Edwards wrote: > You could use the title attribute rather than your non-standard txt > at

[jQuery] Re: Generating a CSV of values from a bunch of Checkboxes with same id

2010-01-10 Thread swfobject_fan
Edward, That's oh I forgot that. Anyways, the .each syntax was what I really wanted. Thanks a bunch. On 9 Jan, 20:30, Peter Edwards wrote: > You could use the title attribute rather than your non-standard txt > attribute, and achieve the same thing using: > > > $(document).ready(function(){ >