From: Johan Meskens CS3 jmcs3 <> wrote:
: # hello
:
: # i don't know what comes first
: # , source or question
:
: # thus
:
: #!/usr/local/bin/perl
:
: use CGI;
: use strict;
: use warnings;
:
: my $q=CGI->new();
:
: print $q->header;
: print $q->start_html;
:
: # things
:
: print "<img src=\"http://127.0.0.1/cgi-bin/image.cgi\">"; # this works
:
: # first question : what is the cgi-oop-way of dealing with images;
: $q->img ?? # i can't find dox on that
print $q->img( { -src => 'http://127.0.0.1/cgi-bin/image.cgi' } );
To get HTML, you'll have to change your call to CGI to:
use CGI qw( -noxhtml );
BTW, you don't need a full url for images from your own server:
print $q->img( { -src => '/cgi-bin/image.cgi' } );
: # second question : how can i insert more than one image # i tried
: the following:
:
: # foreach( 1..6 ){
: # print "<img src=\"http://127.0.0.1/cgi-bin/five.cgi\">"; # }
:
: # but this returns 6 times the same image
Well, that makes sense. What are the names of each image?
The loop above keeps suing the same name each time.
HTH,
Charles K. Clarkson
--
Mobile Homes Specialist
254 968-8328
P.S. CGI.pm doesn't need to document every function. Gerneral
rules to create any tag is in the section titled PROVIDING
ARGUMENTS TO HTML SHORTCUTS.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>