wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes on selecting a radio button in a table row the color of row should be changed Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "on selecting a radio button in a table row the color of row should be changed" Watch "on selecting a radio button in a table row the color of row should be changed" New topic
Author

on selecting a radio button in a table row the color of row should be changed

Shailesh Kumar Saxena
Greenhorn

Joined: Dec 15, 2012
Posts: 25

hi friends...

I am developing an employee registration module using struts 1.3.8 and hibernate.
I need to show a table that is generated dynamically to display all the registration requests.
My requirement is:

"in each row with all details of a particular employee 2 radio buttons are there for approval n reject.
If row is clicked(any where except radio buttons) color of entire row should be pink. If reject radio button is clicked the
color of entire row should change to red and on clicking approve radio button row color should be green."


Any help will be appriciated.


Shailesh Saxena,
Pilibhit, U.P. INDIA
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60774
    
  65

The use of Struts and Hibernate is irrelevant. That's all on the server. The only thing that matters to the client-side code is the HTML page that is sent to the browser.

So it sounds like you need to learn how to do a number of things:
  • Detect when a table row has been clicked.
  • Detect when a radio button has been clicked.
  • Discover which table row a clicked radio button resides within.
  • Chnage the background color of a table row.

  • Use of jQuery for all of this is highly recommended.

    Do you know any JavaScript? Any jQuery?


    [Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
    Shailesh Kumar Saxena
    Greenhorn

    Joined: Dec 15, 2012
    Posts: 25

    Dear Bear Bibeault

    Thanks for your reply. I am a newbie in developement and know little bit of JavaScript. Could you please help me by providing some sample code for my problem.

    Thanks & Regards.
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: on selecting a radio button in a table row the color of row should be changed
     
    Similar Threads
    selecting a row from table using radio buttons
    JSP- finding the table row selected
    row highlight
    Disabling form elements on a table row
    radio button selection in jtable