in reply to CGI question

Untested, but perhaps instead of a comma you can concatenate:

$q->td( $q->submit( -value=>'Submit') . $q->reset );

In the bigger picture, you may want to read the cgi.pm reset button question thread, for a discussion on why you probably shouldn't even bother to use a reset button in your script. It seems to be good advice.


Dave

Replies are listed 'Best First'.
Re: Re: CGI question
by bkiahg (Pilgrim) on Apr 17, 2004 at 15:33 UTC
    That did the trick. Thanks you!!
      The thing to remember (and why concatenation worked) is that CGI scripts basically just output text. The text happens to be HTML text. And the CGI.pm "HTML shortcuts" are the functions that create the text. Since the HTML shortcuts' return values are all just strings, concatenation is an option in cases where you want two entities combined, and a comma would signify two separate items (such as in the case of lists or tables).

      You kind of have to know how a given HTML shortcut looks in its text return-value form. For that, it's convenient to run the CGI script from the command line so you can see what output you're getting and why (or why not) it's doing what it's doing.


      Dave

        Yes it makes perfect sense now, I was just having a brain fart of sorts. Thank you again!