Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Perl CGI dynamic table cell

by alokranjan (Acolyte)
on Aug 03, 2015 at 18:56 UTC ( [id://1137284]=perlquestion: print w/replies, xml ) Need Help??

alokranjan has asked for the wisdom of the Perl Monks concerning the following question:

Can anyone please let me know if I can use "if" condition with the value of my hash and then decide the color of the cell in the table?

I am using Perl CGI to print my hash in table, but want to show the specific value say if it's less than 60, then cell color in red.

Thanks
Alok

Replies are listed 'Best First'.
Re: Perl CGI dynamic table cell
by afoken (Chancellor) on Aug 03, 2015 at 19:57 UTC

    Context: Table in Perl CGI

    Alexander

    --
    Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

      Yep, and the solution using Spreadsheet::HTML even showed how to color the table cells!

      The way forward always starts with a minimal test.
Re: Perl CGI dynamic table cell
by 1nickt (Canon) on Aug 03, 2015 at 19:55 UTC

    Can anyone please let me know if I can use "if" condition with the value of my hash and then decide the color of the cell in the table?

    Yes, you can.

    What have you tried so far? Please post a small working script that shows how you take the values from the hash and create HTML for them, and how you try to implement the if condition.

    The way forward always starts with a minimal test.
      Thanks everyone. It's done :)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1137284]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2024-03-29 07:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found