File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

selecting dynamically added rows of a table

 
Pradeep Adibatla
Ranch Hand
Posts: 336
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a table with header and the rows are added to the table through a Javascript.

The call is as follows...




In the below Javascript I am trying to differentiate the scanning of rows in the table by writing a function which would give a green on a mouseover/click and white for mouse out...

The problem with my code is everytime I add a row I can do mouseover/out/click only for the recently added row.For example I added 9 rows and I add the 10th row I can do mouseover/out/click only for the 10th row where as I need the whole table to be scanned and onclick should be able to listen to that row to set its values in DB...

Help me with this... If it's incorrect please provide any existing codes related to this...I am struggling with this for past 5 days to make it work...Thank you!!!


The Javascript is :
----------------------------



 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64181
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your use of global variables, specifically vocabBody is biting you in the rear.

Have you considered the use of a modern JavaScript library like jQuery or Dojo to vastly simplify your script?
 
Pradeep Adibatla
Ranch Hand
Posts: 336
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No . It would be great if you could give some inputs on them as I have the least idea. I need to finish it by EOD Hope I could learn and implement quickly.
Some notes or saple codes on same would be great.thank you!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic