wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes Enabling button on row selection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Enabling button on row selection" Watch "Enabling button on row selection" New topic
Author

Enabling button on row selection

Sree Mami
Ranch Hand

Joined: Jul 13, 2006
Posts: 75
Hi all

This task needs to be achieved purely using HTML or Javascript

I have a form which consists of some form elements and table. I am getting values in the table from the database using jsp's. Whenever, I select a row those values needs to be displayed in the corresponding form elements which I am getting using:

onclick event of Table Row: passing the values in the row to a javascript function for setting row values in the corresponding form elements.

Along with all these I also have a button which is DISABLED by default, whenever I select a row that needs to be ENABLED

I tried this passing the other function to EnableButtons as 2nd argument to the onclick event of the Table Row, but it didn't work. What else can be done?

I tried pasting part of the code but I am getting some error, with the HTML < which I need to replace, so I am just explaining my problem here.
Vallidevi Appana
Greenhorn

Joined: Jun 30, 2006
Posts: 25
Hi

I think you can use same method to populate the form elements and to enable button on onclick of table row.

put the following code in your js function...

document.getElementById("myButton").disabled=false;

here "myButton" is name of the button.
[ July 20, 2006: Message edited by: Vallidevi Appana ]
Sree Mami
Ranch Hand

Joined: Jul 13, 2006
Posts: 75
Hi Vallidevi Appanna

Ya, it's working that way.

Thank u
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Enabling button on row selection
 
Similar Threads
help on html: options
select a row of a dynamically generated table
row selection
html:select AJAX question
2 dimensional array