Mailing List Archive

undocumented feature?
I noticed a functionality of Embperl just now that I wasn't aware of. My
code looks more or less like this:

$fdat{uid} = 113;
<input type=text name=uid>

resulting in this HTML source:

<INPUT type=text name=uid VALUE="113">

I went back and checked the %fdat docs, but couldn't find any mention of
this behavior. Should it be in there, or what?

Thanks,
Jack Cushman
Re: undocumented feature? [ In reply to ]
> I noticed a functionality of Embperl just now that I wasn't aware of. My
> code looks more or less like this:
>
> $fdat{uid} = 113;
> <input type=text name=uid>
>
> resulting in this HTML source:
>
> <INPUT type=text name=uid VALUE="113">
>
> I went back and checked the %fdat docs, but couldn't find any mention of
> this behavior. Should it be in there, or what?
>

That's one of Embperl features. See
http://perl.apache.org/embperl/Embperl.pod.4.html#HTML_Tags and scroll to
INPUT/OPTION/TEXTAREA

Gerald

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

Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter@ecos.de Voice: +49 6133 925151
WWW: http://www.ecos.de Fax: +49 6133 925152
-------------------------------------------------------------
Re: undocumented feature? [ In reply to ]
>
> BTW, I was reading through that section once you pointed it out. With this
> example,
> ---Quote---
> <FORM METHOD=``POST''> <P>Select Tag</P>
>
>
> If you request this document with list.htm?SEL1=x
> you can specify that the element which has a value
> of x is initially selected
>
>
> <P><SELECT NAME="SEL1">
> <OPTION VALUE="[+ $v[$row] +]">
> [+ $k[$row] +]
> </OPTION>
> </SELECT></P>
> </FORM>
> ---End quote---
> it seems that the initial selection thing only works with the [$row]
thing;
> if it's done with a foreach, or hardcoded, there's no default selected.
>

No, it works also with every OPTION tag, as long as the VALUE attribute of
the OPTION tag matches an value in %fdat (with the key is the Name Attribute
of the SELECT tag)

Gerald


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

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