Hello folks:

Thanks for all the responses.  Let me explain why I cannot populate the hash 
containing radiobutton/checkbox logic in Perl.
My Perl script is written as a controller script which takes 'action' and 
'data' as parameters.  The action can be any of 'view', 'edit', 'update' 
etc.  The data is just a literal indicating the datasource (does not need to 
match the actual table).  The controller.pl combines the two literals, and 
looks for 2 files as a combo of <action><data>.tmpl, and .sql.  The .tmpl is 
the template, and the .sql is the sql.  As a result, the core controller 
script is not aware of any data fields at design time, and becomes database 
aware AT RUNTIME ONLY.  This has allowed me to go against ANY table.  The 
only caveat is that the fields retrieved by the SQL must match the 
fieldnames in the tmpl files.  Of course there is some special processing 
logic in the controller script for inserts/updates, as they do not output 
views.

Now do you see why I can't write the logic within Perl?  I have to enable 
this within the .TMPL, no matter how bad it sounds in principle.

Any comments?

>From: Flemming Mahler Larsen <[EMAIL PROTECTED]>
>To: htmltmpl <[EMAIL PROTECTED]>
>Subject: Re: [htmltmpl] How to print SELECTED in an OPTION
>Date: Thu, 04 Apr 2002 15:27:39 +0200
>
>Kapoor, Nishikant X wrote:
> >>
>>><select name=drop>
>>><tmpl_loop drop><option value="<tmpl_var value>"
>>><selected>><tmpl_var label>
>>></tmpl_loop></select>
>>>
>>
>>I like this approach but am hesitant to mix the presentation with logic,
> > especially, when html page designers in my group are not the ones
> > writing the code.
>
>Please explain why this is approach mix presentation with logic. I'm not
>quite sure I understand the problem. How could you do a better split?
>
>Would you generate the entire drop-down into an <tmpl_var XXX>-variable
>or what?
>
>(( Flemming ))
>--
>Flemming Mahler Larsen, Media & Portal Technology @ TDC Internet
>http://card.netfactory.dk/ , +45 3552 6452
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>


_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com


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

Reply via email to