This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

help with methods in jsp

 
Bashar Ayyash
Ranch Hand
Posts: 44
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,,,,

I need your help with my JSP page. I have a page which displays users details, from a database, in a table and beside each row there are two buttons (Delete and Submit). I successfully displayed the data in a table, but I didn't know how to make Delete button calls delete method and what to write in delete method(), the method will change the font style to line-through, and the row background to another color. The data won't be deleted from the DB but its style and background will change.

The submit button will copy the user details into the admin table in the DB and change the status of the row to Submitted.

Can anybody help me please?

Thanx in advance for any help you would provide.
[ January 18, 2006: Message edited by: Bear Bibeault ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This kind of help is really beyond the scope of a users forum.

I would recommend finding some books on the technologies that are involved and spending some time reading them.
There is also a lot of information to be found on the web.
http://www.google.com/search?hl=en&q=JSP+TUTORIAL&btnG=Google+Search
http://www.google.com/search?hl=en&lr=&q=HTML+TUTORIAL&btnG=Search
http://www.google.com/search?hl=en&lr=&q=JDBC+TUTORIAL&btnG=Search
http://www.google.com/search?hl=en&lr=&q=CSS+TUTORIAL&btnG=Search

If you get stuck on a single issue, by all means, come on back and ask.
Good-Luck
 
Bashar Ayyash
Ranch Hand
Posts: 44
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you for the info you provided I managed to delete the row, but can anybody help me with the submit button
[ January 18, 2006: Message edited by: Bear Bibeault ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64188
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What help do you need? Generally a submit button submits the form, which causes the backend processing to occur, and then the page gets refreshed with the new data.
 
Bashar Ayyash
Ranch Hand
Posts: 44
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bacause there are many submit buttons (Beside each row), how to get that row id and transfer it to the DB to SELECT all the details associated with that id.

I hope you got the idea.
 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could use the onClick event in Javascript, passing the rowId to you function. This function will set the rowId into a hidden parameter of your form, then submit. You can then retrieve the rowId in the servlet from the hidden parameter. That's one way.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic