Hi,

> I wonder if anyone has noticed this error in embperl.

Not everything that people think is an error of Embperl... :-)

>  Embperl will refuse
> to print out CHECKED or SELECTED with in <input> or <select> tags if they
> are stored within a variable.  I think the following code example
> will best
> explain the situation.
>
> [-
> #store values
> $value1 = "";
> $value2 = "";
>
> #do whatever processing then based on a response, now select which
> #input tag to mark as checked
> $value1 = "CHECKED";
> -]
>
> <input [+$value1+] type="radio" name="cc" value="0">
>
> The only result I have gotten is that nothing will ever be
> printed out.  Now
> of course I've used work arounds like doing an if-then block, but I wonder
> if this is a bug?  The same occurs in <select> blocks when trying to place
> SELECTED in an <option> tag by using a variable.
>

I guess your %fdat contains a value for the key 'cc' which is not equal 0.
In this case Embperl will remove the CHECKED form the input tag, if the
value of $fdat{'cc'} eq '0' then Embperl will add the CHECKED to your INPUT
tag. If $fdat{'cc'} doesn't exists, then Embperl will leave your INPUT tag
untouched. So either do a

[- delete $fdat{'cc'} -]

before your INPUT tag, or, better, a

[- $fdat{'cc'} = 0 -]
<input type="radio" name="cc" value="0">


Gerald



-------------------------------------------------------------
Gerald Richter    ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
E-Mail:     [EMAIL PROTECTED]         Voice:    +49 6133 925151
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to