I think what your after is:
<!--#exec cgi="/cgi-bin/data_in_var1.cgi" -->

you'll need to have includes using exec turned on, I'm pretty sure that the
default is off on most servers...


----- Original Message ----- 
From: "Greg Wardawy" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, December 15, 2004 1:28 PM
Subject: Re: CGI - re-writing the content of the cell on the web page


> Thanks a lot $Bill. I will try all of your suggestions.
> So, there is no way to write the script, execute it as a SSI inside the
cell
> of the table:
>
> ---SNIP---
>   <tr>
>     <th width="60" scope="row">1</th>
>     <td width="180" bgcolor="#FFFFFF"><div align="right">
>         <p>
>     <!--#include virtual="/cgi-bin/data_in_var1.cgi" -->
>                           </p>
>     </div></td>
>   </tr>
> ---SNIP---
>
> and have the content of the cell re-written with a new value of the
> variable, right?
> Don't laugh too hard if this question is stupid. I'm quite new to the CGI
> programming and I thought that there is a way to send a new value to the
> cell avoiding sending the cell with a new value.
> Thanks again.
>
> Greg.
>
> ----- Original Message ----- 
> From: "$Bill Luebkert" <[EMAIL PROTECTED]>
> To: "Greg Wardawy" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Wednesday, December 15, 2004 10:11 AM
> Subject: Re: CGI - re-writing the content of the cell on the web page
>
>
> > Greg Wardawy wrote:
> >
> >> Hello all,
> >>
> >> My question is short even though I've spent the last couple of days
> >> trying
> >> to find the answer and am stumped.
> >> What is the trick to force the Server Site Included CGI script to
> >> re-write
> >> the content of the cell with the new value of the variable?
> >> My script (there is, actually a bunch of them printing values of
> >> different
> >> variables in a separate cells of the table) is as simple as follows:
> >>
> >> #######################################################
> >> #!/usr/bin/perl -w
> >> use strict;
> >> print "Content-type: text/html\n\n";
> >>
> >> my $file_in = "nolram.in";
> >>
> >> open (IN,"<$file_in") or die "Can't open $file_in for reading: $!\n";
> >>
> >> my ($var1,$var2,$var3,$var4,$var5,$var6,$var7,$var8,$var9,$var10);
> >>
> >> while (<IN>) {
> >>     chomp;
> >>     s/\s{2,}//g;
> >>     ($var1,$var2,$var3,$var4,$var5,$var6,$var7,$var8,$var9,$var10) =
> >> split/,/;
> >>     print "$var1\r";
> >> }
> >> close IN;
> >> exit;
> >> #######################################################
> >>
> >> and works just fine in the command prompt or a terminal window but it
> >> prints
> >> a couple tousand values in a single cell on the web page. And that's
not
> >> what I need.
> >> Thanks a lot for any help.
> >
> > I would think that 1) you would bracket each cell with the appropriate
> > table syntax (like <td>...</td>) and a <tr> somewhere too.  2) you
> > probably want to change the \r to a \n on your last print also (after
> > adding the tr tags (eg: print "<td>$var1</td>\n";).  3) Add a <table>
> > and <tr> before the loop and a </tr> and </table> after (or include a
> > tr on each td : print "<tr><td>$var1</td></tr>\n"; )
> >
> > -- 
> >  ,-/-  __      _  _         $Bill Luebkert
Mailto:[EMAIL PROTECTED]
> > (_/   /  )    // //       DBE Collectibles    Mailto:[EMAIL PROTECTED]
> >  / ) /--<  o // //      Castle of Medieval Myth & Magic
> > http://www.todbe.com/
> > -/-' /___/_<_</_</_    http://dbecoll.tripod.com/ (My Perl/Lakers stuff)
> > _______________________________________________
> > Perl-Win32-Users mailing list
> > [EMAIL PROTECTED]
> > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
> >
> >
> >
>
> _______________________________________________
> Perl-Win32-Users mailing list
> [EMAIL PROTECTED]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to