Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: HTML::CalendarMonth - printing a consistent (6) rows for days of the week

by jmanning2k (Pilgrim)
on Dec 11, 2003 at 15:35 UTC ( [id://314055]=note: print w/replies, xml ) Need Help??


in reply to HTML::CalendarMonth - printing a consistent (6) rows for days of the week

Why don't you try posting a code snippet - especially the one that gives you an error.

I'd rather experiment with existing code than to redo what you've already done.

  • Comment on Re: HTML::CalendarMonth - printing a consistent (6) rows for days of the week

Replies are listed 'Best First'.
Re: Re: HTML::CalendarMonth - printing a consistent (6) rows for days of the week
by jonnyfolk (Vicar) on Dec 11, 2003 at 17:03 UTC
    The code I am practising with is the following:
    #!/usr/bin/perl -w use CGI qw(:standard); use Date::Calc qw(:all); use CGI::Carp qw(fatalsToBrowser warningsToBrowser); use HTML::AsSubs; use HTML::Element; use HTML::CalendarMonth; $c = new HTML::CalendarMonth ( month => 2, year => 2003, bgcolor => 'white', ); $c->extent($c->maxrow + 2, $c->maxcol +2); $c->all->attr(bgcolor => 'cyan'); $c->item($c->month)->wrap_content(font({size => '+2'})); $c->item($c->year)->wrap_content(strong()); $c->cell(0,2)->attr(rowspan => 2); $c->cell(0,2)->attr(colspan => 7); $c->cell(0,2)->push_content(em(font({ size => +2 }, 'The calendar is part', br(),'of this table'))); print $c->as_HTML;
    If I insert   last_row(); after the print, for example I get the error: Undefined subroutine &main::last_row called at ./calMonth1.pl line 33.

    The reason I am looking at last_row is that then I might be able to define some parameters using a conditional statement.

    If you perceive that I am guessing you wouldn't be far wrong... :)

      Looks like the last_row() call should be $c->last_row().

      (Also, I think the calendars wouldn't look higgledy piggledy if they were aligned at the top -- try putting a valign=top in the tr that contains them...)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (3)
As of 2024-04-16 11:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found