CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
CGI Form -> radio_group -> text color?

 



andreypz
New User

Aug 14, 2008, 5:00 AM

Post #1 of 5 (1161 views)
CGI Form -> radio_group -> text color? Can't Post

Hello,
please look at this code I use:


Code
 
my %opt = ( '1' => 'first line',
'2' => 'second line',
'3' => '--3d line--');

print $q->radio_group(
-name => 'myname',
-values => [sort keys %opt],
-labels => \%opt,
-columns => 1 );


Now, assume that I want '3d line' to be red,
How can I do that?

Note that this doesn't help:

Code
 -attributes => {'3' => {'style' => 'color: red'}},


because it affects only on the 'circle' not a text near it.


(This post was edited by andreypz on Aug 14, 2008, 5:02 AM)


KevinR
Veteran


Aug 14, 2008, 12:54 PM

Post #2 of 5 (1141 views)
Re: [andreypz] CGI Form -> radio_group -> text color? [In reply to] Can't Post

Personally, I can't see anyway to apply color to just one of the lines in the radio group. The CGI module does have its limitations. Maybe someone else will know.
-------------------------------------------------


andreypz
New User

Aug 15, 2008, 4:13 AM

Post #3 of 5 (1127 views)
Re: [KevinR] CGI Form -> radio_group -> text color? [In reply to] Can't Post

It's sad.

But maybe is it possible to create my own CGI function?
Say $q->radio_group2()
which will behave as I want.
Don't you know how?


KevinR
Veteran


Aug 15, 2008, 9:16 AM

Post #4 of 5 (1124 views)
Re: [andreypz] CGI Form -> radio_group -> text color? [In reply to] Can't Post

You don't need to make a CGI function/method, just make a private function in your script to handle the color.
-------------------------------------------------


eWish
User

Aug 16, 2008, 7:17 PM

Post #5 of 5 (1076 views)
Re: [andreypz] CGI Form -> radio_group -> text color? [In reply to] Can't Post

I don't believe that attribute is standard HTML much less supported by CGI .pm. Did you see this somewhere and then want to do the same? Maybe it can be done using some JavaScript just a guess.

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives