[jQuery] Re: identify tables with same ID ( duplicate ids)

2008-03-03 Thread Gordon
IDs are supposed to be, by definition, unique. They are there so that scripting languages and CSS style rules can easily identify single elements. If your markup has more than one element with the same ID in it, then your markup is broken. If you have more than one element that needs to have

[jQuery] Re: identify tables with same ID ( duplicate ids)

2008-03-03 Thread Samant
Thanks Karl, Klaus and Gordon. I will try the approach and let u know. The reason i have duplicate ID tables is due the fact that.. my 1st table is a template table (this is hidden). On click of a button, i add tables dynamically (using the 1st table as a template) to the page (using DOM + js).

[jQuery] Re: identify tables with same ID ( duplicate ids)

2008-03-03 Thread MorningZ
On click of a button, i add tables dynamically (using the 1st table as a template) to the page (using DOM + js). Hence i end up with multiple tables with duplicate id's Have a counter of some sort, like a global variable like var TableCount = 0; when you add, append this value to the id

[jQuery] Re: identify tables with same ID ( duplicate ids)

2008-03-03 Thread Samant
Hi MorningZ, Did not want to use this approach as, the tables can be added and removed dynamically..., so to complete the story .. htere are 2 buttons add and delete. Let say, the user adds 3 tables first. Then the global variable value will be 3 and tables will have ID as 'Instructions_1',

[jQuery] Re: identify tables with same ID ( duplicate ids)

2008-03-03 Thread MorningZ
It's your application and your code and your functionality... but something comes to mind So what if there are gaps in the ID name? At least that will keep them unique, and if you can use a very similar selector, just one additional character different in fact, to keep this very important base

[jQuery] Re: identify tables with same ID ( duplicate ids)

2008-03-03 Thread Michael Ray
its not hard to change it from an ID to a class, just say class=blahblahblah instead of id=blahblahblah You could also store the table IDs in a database and then you would never have duplicate IDs On Mon, Mar 3, 2008 at 1:39 PM, MorningZ [EMAIL PROTECTED] wrote: It's your application and your

[jQuery] Re: identify tables with same ID ( duplicate ids)

2008-03-02 Thread Karl Rudd
1. Not that I know of. 2. Try: $('table[id=Instructions]') Karl Rudd On Mon, Mar 3, 2008 at 6:32 AM, Samant [EMAIL PROTECTED] wrote: hi, I have 2 questions here for the group.. 1. Does Jquery have native functions or lib or plugins to support conversion of HTML Table data