| Author |
Weird issue while populating a table using jquery
|
Naveen puttu
Ranch Hand
Joined: Sep 15, 2009
Posts: 88
|
|
Hi,
Code in my jsp
This is a snippet of my JS file
This is how im calling my js function
The issue that iam facing right now is that the click event renders the data in the table ; as in the <tboby> has the data populated , however the change event doesnt ; as in the <tboby> is empty
What am i missing ??
Cheers
n4v33n
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15357
|
|
You want to append the rows to the table's tbody, not the table
Eric
|
 |
Naveen puttu
Ranch Hand
Joined: Sep 15, 2009
Posts: 88
|
|
anything is fine eric
but why isnt the data showing up
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15357
|
|
table.append
That is appending it to the table and not the tbody
should be
Also are you sure it is getting the data and creating the rows? Have you used a tool such as Fiddler to add break points and see what is happening?
Eric
|
 |
Naveen puttu
Ranch Hand
Joined: Sep 15, 2009
Posts: 88
|
|
eric
im using firebug debug functionality and i can see the data . its only that the data isnt getting set in the table
|
 |
Naveen puttu
Ranch Hand
Joined: Sep 15, 2009
Posts: 88
|
|
eric
iam using firebug debug functionality and i can see the data . its only that the data isnt getting set in the table
BTW your suggestion did not work ERIC . its so frustrating man
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15357
|
|
|
Are you actually seeing it going into the each loop?
|
 |
Naveen puttu
Ranch Hand
Joined: Sep 15, 2009
Posts: 88
|
|
Hey Eric,
I fixed this issue mate
while i was doing this
i wasnt emptying the $("#questionWeightsTableContainer") . So there were two tables with the same id and that was the culprit
i was so stupid . took me a really long time to realise
Thanks for the inputs mate
Cheers
n4v33n
|
 |
 |
|
|
subject: Weird issue while populating a table using jquery
|
|
|