• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

row selection

 
Pradeep Adibatla
Ranch Hand
Posts: 336
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to select a row of a dynamically generated table? any pointers would be of great help....thank you!
 
manoj r patil
Ranch Hand
Posts: 181
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your this post is also not clear. What do you mean by "selecting a row"? What is your table structure?
 
Pradeep Adibatla
Ranch Hand
Posts: 336
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a table with 3 columns...The header is static but the rows are dynamically added using a Javascript .The values for row are set using a form with 3 text fields.This is how it goes...First on load I have a table with header.Below that I have an Add button.A click on Add button generates a form with 3 text fields.On click of submit button the form is hidden from UI and a row is added with values in their corresponding places and the process could continue.Now for mouse over,mouseout and mouseClick I have have a Javascript function that shows the difference by using colors(green during mouseover,and row click,non during mouse out) but I don't know where to call and use this function since my row is dynamic.I need to get the row from the 1st javascript and check...how to do this? is this clear? (on farther side --->By selecting the row I need to modify,delete the row and update in DB/XML,but before that I should be able to go through all the rows using the mousepointer and show the user which row I am selecting for operation...) sorry the code is a bit big,if still not clear I would post!!
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you want to use Ajax or a normal form submission?

So you add an onclick event. You grab the row object and you look at the id, column data, etc. You can either put it in an Ajax call to the server or hidden fields and post the data back to the server to be updated.

Eric
 
Pradeep Adibatla
Ranch Hand
Posts: 336
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Eric....

I am a tyro and I am developing in struts and can only understand the meaning of wthat you have said...an example of your aforementioned would make bring abundant clarity..thankyou!

-- pradeep
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An example of what?

I am not going to code 2 applications for you. lol

Eric
 
Pradeep Adibatla
Ranch Hand
Posts: 336
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Eric....

I am a tyro and I am developing in struts and can only understand the meaning of wthat you have said...an example of your aforementioned would make bring abundant clarity..thankyou!

-- pradeep
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An example of what?

I am not going to code 2 applications for you. lol

Eric

[ ]
 
Pradeep Adibatla
Ranch Hand
Posts: 336
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I meant an example or a link as to how to transfer data as an ajax call to another jsp and use it there... thnx!
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ajax tutorial is a good starting point

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic