aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes make a cell in a table ediable in a jsp page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "make a cell in a table ediable in a jsp page" Watch "make a cell in a table ediable in a jsp page" New topic
Author

make a cell in a table ediable in a jsp page

Komal Amaresh
Ranch Hand

Joined: Oct 06, 2008
Posts: 67
Hi,

I have make a cell in a table editable. After editing the value in the cell and on clicking the update button, the database should be updated and the page refreshed.
I have three columns, the first column is date. All the rows of the date columns should be made editable on the client side itself on clicking the particular cell. I' am stuck at this point and cant think of any solution.
Please help me.

regards,
Komal
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61428
    
  67

There is nothing in JSP that can help you. JSP just let's you create HTML pages that are sent to the browser. Once there, a JSP is just an HTML page like any other.

You'll need to effect this in JavaScript.

Topic moved appropriately.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61428
    
  67

In the click handler, write script that either creates, or reveals previously created but hidden, input elements in the cells and hides the text values.

Komal Amaresh
Ranch Hand

Joined: Oct 06, 2008
Posts: 67
Hi,

I dont really know how to work it out.
I have a table displaying a list of holidays with three columns, the date, the occassion and the state displayed as a checkbox. If the checkbox is checked, it I should be able to edit the occasion name otherwise it should not be editable. Please help me with some example code.

Thanks in advance,

regards,
Komal
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61428
    
  67

That's not the way that JavaRanch works. You write the code. We help you with problems that you may have with it. Please read this for more information.

Give it a try. Surely you can at least get it started!
 
 
subject: make a cell in a table ediable in a jsp page