in reply to RE: I use for
in thread I use for

Thus saith royalanjr:
Call me crazy, but I generally do not let do my HTML. I prefer to write that out myself. Being new, I know I have not explored all its possibilies yet though. I do use it to pass my parameters around.
Once you discover the sticky fields technology of web form generation, you'll never go back. rules!

-- Randal L. Schwartz, Perl hacker

Replies are listed 'Best First'.
RE: RE: RE: I use for
by cwest (Friar) on Jun 08, 2000 at 06:11 UTC
    Not to mention, with some creative map use, you can create dynamic tables and such pretty easy, while not breaking the stylish print 'some','things','in','a','row'; :-)
    use CGI;
    my $cgi = CGI->new;
    print $cgi->header,
          $cgi->start_html('Times Tables'),
          $cgi->table( { -border => 1 },
                     ( map {
                      my $r = $_;
                      $cgi->Tr( ( map {
                               $cgi->td( $_ * $r ),
                              } 1 .. 50 ) ),
                     } 1..50 ) ),
    And for the obfuscated lovers in all of us (some people would call the above obfuscated.. slackers:-)
    use CGI;my$cgi=CGI->new;print##
    ('Times Tables')=>$cgi->table(#
RE: RE: RE: I use for
by chromatic (Archbishop) on Jun 08, 2000 at 05:03 UTC
    I've run into a case where was a little too sticky. Still, it's really a good way to go, as you don't have to worry about updating code in a script somewhere when the HTML specification changes.

    Has anyone tried the 3.0 alpha versions? They're supposed to be much smaller and much, much faster.

      I agree. Sometimes the stickiness make a script to behave strange, especially if you have a muliple page form generation / evaluation script with hidden fields.
      There is a good idea to try the 'override' flag on hidden fields if such a script behaves strange.


RE: RE: RE: I use for
by royalanjr (Chaplain) on Jun 08, 2000 at 17:15 UTC

    Sticky Fields?!?

    *pulling at my hair in despair, dropping to my knees*

    So much to learn!!!

    Roy Alan

    "I quit; I concede. Tanj on your silly game!" -- Louis Wu

      Sticky fields is a facility which is useful when you have a CGI script which returns multiple forms; The script automatically fills in the old formfield data (i.e. the data that has already been posted)
      This is wery useful if you want to keep track of the information the user has already entered in hidden fields, or if you have to resend a form because the user did something wrong