You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Michael Stepanov <mi...@francoudi.com> on 2004/02/03 08:30:36 UTC

Problem with using $row

Dear all,

Great project, many thanks Gerald and team!!!

I need your help. I have a some problem with using $row instead of
loop:

 1 [-  $values = [ [1, 2], [3, 4], [5, 6] ];  -]
 2
 3 <select id="udf_list" class="udf_list" onchange="SelectUDF()">
 4 [$ foreach my $item (@$values) $]
 5     <option value="[+ $item->[0] +]"
 6             label="[+ $item->[2] +]"
 7             title="[+ $item->[3] +]">[+ $item->[1] +]
 8     </option>
 9 [$ endforeach $]
 10 </select>
 11
 12 <select id="udf_list" class="udf_list" onchange="SelectUDF()">
 13     <option value="[+ $values->[$row][0] +]"
 14           label="[+ $values->[$row][2] +]"
 15           title="[+ $values->[$row][3] +]">[+ $values->[$row][1] +]
 16     </option>
 17 </select>

When I use first method to fill dropdown list, all work correctly,
but when I try to use second method I have error:

[17573]ERR:  24:  Error in Perl code: Unmatched right curly bracket at 
/home/michaels/work/Billing/./html/tmp/test_3.epl line 23, at end of line
syntax error at /home/michaels/work/Billing/./html/tmp/test_3.epl line 
23, near ";

}"
<HTML><HEAD><TITLE>Embperl Error</TITLE></HEAD><BODY bgcolor="#FFFFFF">
<H1>Internal Server Error</H1>
The server encountered an internal error or misconfiguration and was 
unable to complete your request.<P>
Please contact the server administrator,  and inform them of the time 
the error occurred, and anything you might have done that may have 
caused the error.<P><P>
[17573]ERR:  24:  Error in Perl code: Unmatched right curly bracket at 
/home/michaels/work/Billing/./html/tmp/test_3.epl line 23, at end of line
<br>&nbsp;&nbsp;&nbsp;&nbsp;syntax error at 
/home/michaels/work/Billing/./html/tmp/test_3.epl line 23, near &quot;;
<br>&nbsp;&nbsp;&nbsp;&nbsp;
<br>&nbsp;&nbsp;&nbsp;&nbsp;}&quot;<p>
Offline Embperl 2.0b8 [Mon Feb  2 16:18:13 2004]<P>
</BODY></HTML>

Any ideas what I did wrong?

Thanks in advanced.

-- 
Best regards, 
Michael Stepanov,
Perl/Linux Developer 
Francoudi & Stephanou Ltd.



---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: Problem with using $row

Posted by Michael Stepanov <mi...@francoudi.com>.
Gerald Richter wrote:

> >
> > When I use first method to fill dropdown list, all work correctly,
> > but when I try to use second method I have error:
> >
> > [17573]ERR:  24:  Error in Perl code: Unmatched right curly bracket at
> > /home/michaels/work/Billing/./html/tmp/test_3.epl line 23, at end of
> > line syntax error at
> > /home/michaels/work/Billing/./html/tmp/test_3.epl line 23, near ";
> >
> > }"
>
> Looks like a bug in Embperl 2.0
>
> I have to take a deeper look at it and let you know where the problem is
>
Many thanks, Gerald.

> Gerald
>
> --------------------------------------------------------------
> Gerald Richter     ecos electronic communication services gmbh
> IT-Securitylösungen * dynamische Webapplikationen * Consulting
>
> Post:       Tulpenstrasse 5          D-55276 Dienheim b. Mainz
> E-Mail:     richter@ecos.de          Voice:   +49 6133 939-122
> WWW:        http://www.ecos.de/      Fax:     +49 6133 939-333
> --------------------------------------------------------------
> |
> |   ECOS BB-5000 Firewall- und IT-Security Appliance: www.bb-5000.info
> |
> +-------------------------------------------------------------
>


-- 
Best regards, 
Michael Stepanov,
Perl/Linux Developer 
Francoudi & Stephanou Ltd.



---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: Problem with using $row

Posted by Gerald Richter <ri...@ecos.de>.
>
> When I use first method to fill dropdown list, all work correctly,
> but when I try to use second method I have error:
>
> [17573]ERR:  24:  Error in Perl code: Unmatched right curly bracket at
> /home/michaels/work/Billing/./html/tmp/test_3.epl line 23, at end of
> line syntax error at
> /home/michaels/work/Billing/./html/tmp/test_3.epl line 23, near ";
>
> }"

Looks like a bug in Embperl 2.0

I have to take a deeper look at it and let you know where the problem is

Gerald

--------------------------------------------------------------
Gerald Richter     ecos electronic communication services gmbh
IT-Securitylösungen * dynamische Webapplikationen * Consulting

Post:       Tulpenstrasse 5          D-55276 Dienheim b. Mainz
E-Mail:     richter@ecos.de          Voice:   +49 6133 939-122
WWW:        http://www.ecos.de/      Fax:     +49 6133 939-333
--------------------------------------------------------------
|
|   ECOS BB-5000 Firewall- und IT-Security Appliance: www.bb-5000.info
|
+-------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: Problem with using $row

Posted by Gerald Richter <ri...@ecos.de>.
>
> When I use first method to fill dropdown list, all work correctly,
> but when I try to use second method I have error:
>
> [17573]ERR:  24:  Error in Perl code: Unmatched right curly bracket at
> /home/michaels/work/Billing/./html/tmp/test_3.epl line 23, at end of
> line syntax error at
> /home/michaels/work/Billing/./html/tmp/test_3.epl line 23, near ";
>
> }"

It's now fixed in the CVS version.

To fix the problem simply delete line 231 in epcomp.c:

pInfo -> pEmbperlCmds[nNodeName].bPerlCodeRemove |= pCmd -> bPerlCodeRemove
;

The problem only occurs if your select tag doesn't have a name attribute

Gerald

--------------------------------------------------------------
Gerald Richter     ecos electronic communication services gmbh
IT-Securitylösungen * dynamische Webapplikationen * Consulting

Post:       Tulpenstrasse 5          D-55276 Dienheim b. Mainz
E-Mail:     richter@ecos.de          Voice:   +49 6133 939-122
WWW:        http://www.ecos.de/      Fax:     +49 6133 939-333
--------------------------------------------------------------
|
|   ECOS BB-5000 Firewall- und IT-Security Appliance: www.bb-5000.info
|
+-------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org