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 a
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
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', 'I
"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 i
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).
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 th
On Mar 3, 4:28 am, "Karl Rudd" <[EMAIL PROTECTED]> wrote:
> 2. Try:
>
> $('table[id=Instructions]')
Instead of working around an error on your side try not to use
duplicate ids. An id is supposed to be unique in a document - that's
why length is 1 because the underlying document.getElementByI
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
8 matches
Mail list logo