perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Maurício Amorim " <masil...@terra.com.br>
Subject Re: Table inside Table
Date Tue, 14 Jan 2003 14:27:06 GMT
I tried it but don't get sucess.

My routine is like:

#
# Rotina: geranavegacao
#
sub geranavegacao {
    my ($sth) = shift;
    my ($refhashscan) = shift;
    #
    # Fim cursor
    #
    undef local $nivel;
    return unless defined $refhashscan;
    $nivel = $$refhashscan{NIVEL};
    print '<table border=0 cellpadding="0" cellspacing="0"' . chr(10);
    do {
        print "<tr><td valign=middle>" . chr(10);
        foreach ($$refhashscan{STATUSBOTAO}) {
            /0/ && do {
                print '<a href="javascript:submissao(' . $$refhashscan{IDNO} . ',0);"><img
src="../../imgverdoc/botao+.bmp" border=0>&nbsp;</a>' . chr(10);
                last;
            };
            /1/ && do {
                print '<a href="javascript:submissao(' . $$refhashscan{IDNO} . ',1);"><img
src="../../imgverdoc/botao-.bmp" border=0>&nbsp;</a>' . chr(10);
                last;
            };
        }
        print "</td><td>" . chr(10);
        print $$refhashscan{MNOREAL} . chr(10);
        print "</td></tr>" . chr(10);
        $refhashscan = $sth->fetchrow_hashref();
        die "$DBI::errstr" if (defined $DBI::errstr);
    } while (defined $refhashscan && $$refhashscan{NIVEL} == $nivel);
    if (! defined $refhashscan || $$refhashscan{NIVEL} < $nivel) {
        print "</TABLE>" . chr(10);
    } else {
        print "<td></td><td>" . chr(10);
        geranavegacao($sth, $refhashscan);
        print "</td></tr>" . chr(10);
        print "</TABLE>" . chr(10);
    }
}


Which version of embperl i need use ?
I am using 1.3.4.

I tried print to OUT but it no go to stdout.
I tried some of type:

print OUT "<table>"; 

I need any adicional configuration ?


De:"Luiz Fernando B. Ribeiro" 

Para:embperl@perl.apache.org

Cópia:

Data:Tue, 14 Jan 2003 11:21:00 -0200

Assunto:Re: Table inside Table

  

> Em Mon, 13 Jan 2003 22:53:16 +0000
> "Maurício Amorim " escreveu:
> 
> > Hi list, 
> > 
> > I need generate an table that can have table inside table.
> > I am trying an recursive routine, but i don't am getting sucess,
> > because the html is not generate. 
> > 
> > Exist any form for do it.
> > I am trying an explorer in html. (simple)
> > 
> 
> This is very tricky but possible. For reentrant code use plain perl subs
> instead of Embperl [$ sub $] and output html with print OUT.
> 
> Regards,
> 
> Luiz Fernando B. Ribeiro
> Engenho Soluções para a Internet
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> For additional commands, e-mail: embperl-help@perl.apache.org
> 
> 
> Esta mensagem foi verificada pelo E-mail Protegido Terra.
> Scan engine: VirusScan / Atualizado em 11/01/2003 / Versão: 1.3.13
> Proteja o seu e-mail Terra: http://www.emailprotegido.terra.com.br/
> 
> 
Mime
View raw message