Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

CGI tables *runs*

by coldfingertips (Pilgrim)
on Jun 24, 2003 at 17:13 UTC ( [id://268597]=perlquestion: print w/replies, xml ) Need Help??

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

I am having problems getting this table to work. I am trying to get the H5() to actually do something with the text but instead it's printing to screen as text rather than acting like code. When I remove the quotes around h5('hi')"), it changes the text but it alters the table cell. Can anyone tell me what's wrong with this?
print table( Tr( td({-height=>'10', width=>'700', bgcolor=>'#BBCCEE'},"h5('hi)" +), ), Tr( td({-height=>'10', width=>'700', bgcolor=>'#BBCCEE'},""), ), );

Replies are listed 'Best First'.
Re: CGI tables *runs*
by particle (Vicar) on Jun 24, 2003 at 17:17 UTC

    you've got some really funky quotes there. try:

    td({-height=>'10', width=>'700', bgcolor=>'#BBCCEE'}, h5('hi') ),

    ~Particle *accelerates*

      One thing which has helped me when working with tables in CGI is start_table and end_table. This might have helped you pick up the problem with quotes which particle has pointed out.

      use CGI qw(:standard start_table end_table); print start_table; print Tr(td({-height=>'10', width=>'700', bgcolor=>'#BBCCEE'},h5('hi') +)); print Tr(td({-height=>'10', width=>'700', bgcolor=>'#BBCCEE'},"")); print end_table;
        Nope, that wasn't the problem. When I remove the quotes the text changes but the table get's shifted as well, it makes the TD twice the size when the h5 works.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2024-04-25 11:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found