On Sunday, July 13, 2003, at 08:00 PM, Girish Agarwal wrote:
Hi All,
I am new in the HTML::Template world.
welcome.
My Situation,
I have a form with one input field for the
search criteria. Say search on somebody's last name.
When the User types in this field and submits
the form a perl script is called which will do two
things
1) The database needs to be Queried against the
search criteria.
2) A form must be displayed with all the values
from the database populated in the appropriate field
of the form.
This form I am using as a template HTML
file.
The form which I am using as a template has many
<input type=text name"blah"> fields and I have tried
them to modify it like,
<input type=text name="blah" value="TMPL_VAR
ESCAPE=HTM VALUE="lname1">
First of all is this the correct syntax I am
using?
the correct way would be
<input type="text" name="blah" value="<TMPL_VAR ESCAPE=HTML NAME=param>">
or you can shorten it like so
<input type="text" name="blah" value="<TMPL_VAR param ESCAPE=HTML>">
Second, I am trying to display the parameter
field from the template file and I don't get any put
put using something like
$template = HTML::Template->new(filename =>
/filename/);
@parameters1 = $template->param();.
you open your template with
my $template = HTML::Template->new(filename => 'test.tmpl');
and then assign params like so
$template->param(firstname => "Girish"); $template->param(lastname => "Agarwal"); etc.
Please advise, how I can the data populated in the appropriate fields in the resulting Form.
then, assuming your template has been written correctly using the syntax shown above, the input fields in the form will get populated.
Keep in mind, this assumes you are correctly querying the database, retrieving the records as an array of hashes, or, in the case of a single record, as a hash table with the db fields as its keys, and the values as its values.
Secondly, How do I display hover buttons using HTML::Template module. I only get java class loading and nothing happens
sorry, no idea. I could be wrong, but iirc, "hover buttons" (I have no idea what they are) are not a part of the HTML::Template module.
Hope this helps.
Please do look at the H::T docs at http://html-template.sourceforge.net/html_template.html. The docs are really clear and very helpful. There is little I can think of that is not covered by these docs.
(aside note: H::T, in my view, is one of those rare modules where I just can't think of anything else that could be added to it or changed... what a gem).
------------------------------------------------------- This SF.Net email sponsored by: Parasoft Error proof Web apps, automate testing & more. Download & eval WebKing and get a free book. www.parasoft.com/bulletproofapps1 _______________________________________________ Html-template-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/html-template-users
