in reply to CGI question

what's wrong with:

print $q->td($q->submit(-value=>'Submit'),$q->reset);
When I ran that code I got:
<td><input type="submit" name=".submit" value="Submit" /> <input type= +"reset" /></td>

looks correct to me...

Replies are listed 'Best First'.
Re: Re: CGI question
by bkiahg (Pilgrim) on Apr 18, 2004 at 17:23 UTC
    The comma was putting it into its own <td>.

          The comma was putting it into its own <td>

      Hrmmm... I cut/pasted your code and it worked for me...

        Here's the full code I was using.
        print $q->header(-type=>'text/html'), $q->start_html( -title=>'User Setup', -bgcolor=>'#ffffff', -onLoad=>'Javascript:document.houst.userid.select()'), $q->start_form( -name=>'houst', -method=>'post', -action=>$me), $q->table( { -align=>'center', -border=>0, -width=>400, -cellspacing=>10 }, $q->Tr( [ $q->td( { -align=>'center'}, [ $q->font({-face=>'arial', -size=>'+2'}, $q->b('U +ser Setup'))]), $q->td( { -align=>'center'}, [ $q->hr]), $q->td( [ $q->textfield(-name=>'userid', -size=>'42', +-default=>'') ]), $q->td( [ $q->popup_menu(-name =>'server_instance', -values =>['cash_fidev','cash_sbltest'], + # this is the actual argument passed to the server -labels =>{cash_fidev => 'Dev', cash_sb +ltest => 'Test'}) ]), # this is the corisponding label on the webp +age $q->td( [ $q->submit (-value=>'Submit') . ' ' . $q->re +set ] ), # here's where I changed the concantation. $q->td( [ $q->font ({-face=>'arial', -size=>'+1'}, $q- +>b('Output:'))]), $q->td( { -bgcolor=>'#cccccc' }, [ "display" ]), ]) ), $q->end_form, $q->end_html;
        Not sure if you only print out a single table cell with out anything else if it behaves differently??