CGI & Formatting or a Perl Problem?!

N

Nikos

This may be or may not be a Perl question, i dont know.
I also asked this in the css and alt.html ngs but they didnt care to answer.

The code is correct, it does not give any errors but i cant see
anything printed. Please take a look.


====================================================
print start_form(-action=>'index.pl');
print p( {-align=>'center'}, span( {class=>'tip'}, " Some Greek
text" ),
popup_menu( -name=>'select',
-values=>\@display_files ),
submit('ÅðéëïãÞ'));
print end_form;
=====================================================


and inside styles.css i have:

========================
td.tip {
font: 18px times;
color: cyan;
}
========================

But i cant see the quoted text in "big centered lime colored text".
And also in the following snippet:



And also in this as well i cannot se

==============================================
while( $row = $sth->fetchrow_hashref )
{
print table( {class=>'user_form'},

Tr(
td( {-width=>'25%'}, {class=>'name'}, $row->{name}
),
td( {-width=>'50%'}, {class=>'email'}, $row->{email} ),
td( {-width=>'25%'}, {class=>'date'}, $row->{date}
)
),

Tr(
td( {class=>'host'}, "Ao?? oio
Ecoiy" ),
td( {colspan=>2}, {class=>'tip'}, $row->{pray} )
),

Tr(
td( {class=>'tip'}, "?niou?ee?
Ineiaiii?iaoiaoee? Ai?aen?a" )),
td( {colspan=>2}, {class=>'remark'}, $row->{remark} )
),

Tr(
td( {colspan=>3}, {class=>'host'}, $row->{host}
)
),

br() x 2;
}
==============================================

All the classes exist.Here is user_form:

table.user_form {
background-image: url(/data/images/swirl.jpg);
width: 55%;
color: lime;
text-align: center;
font: 18px times;
border: 5px inset blue;
border-collapse: collapse;
}
 
J

Joe Smith

Nikos said:
The code is correct, it does not give any errors but i cant see
anything printed. Please take a look.

Access the CGI with your browser, then use the "Save As" menu item
to store the perl CGI-generated HTML to your hard disk. Then perform
a side-by-side comparison between the saved HTML and hand crafted HTML.
Edit the saved HTML until it looks right. Then retro-fit those
changes into your perl script.
 
F

Fabian Pilkowski

* Nikos said:
This may be or may not be a Perl question, i dont know.
I also asked this in the css and alt.html ngs but they didnt care to answer.

The code is correct, it does not give any errors but i cant see
anything printed. Please take a look.

====================================================
print start_form(-action=>'index.pl');
print p( {-align=>'center'}, span( {class=>'tip'}, " Some Greek
text" ),
popup_menu( -name=>'select',
-values=>\@display_files ),
submit('ÅðéëïãÞ'));
print end_form;
=====================================================

Please re-format your code when posting here. It could be easier to read
if your newsreader won't break long lines. Avoid this by writing:


print start_form(-action=>'index.pl');
print p(
{-align=>'center'},
span( {class=>'tip'}, "Some Greek text" ),
popup_menu( -name=>'select', -values=>\@display_files ),
submit( 'ÅðéëïãÞ' )
);
print end_form;


I can't retrace that you can't see anything printed out by this.
and inside styles.css i have:

========================
td.tip {
font: 18px times;
color: cyan;
}
========================

Err, your CSS class 'tip' is only defined for <td>-tags, and not for
<span>. Please fix that and it should work.

regards,
fabian
 
N

Nikos

Fabian said:
Err, your CSS class 'tip' is only defined for <td>-tags, and not for
<span>. Please fix that and it should work.

Yes you were right, i chanegs td.tip to span.tin and now it is showing
as it should. That also corrected other print errors as well.

Thank you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top