• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Weird issue while populating a table using jquery

 
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You want to append the rows to the table's tbody, not the table

Eric
 
Naveen puttu
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
anything is fine eric

but why isnt the data showing up
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 88
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 88
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you actually seeing it going into the each loop?
 
Naveen puttu
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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

 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic