Kenny,

Thanks.  Part of the reason I was using CGI.pm was cause I don't know too
much html.  Anyhow, now is time to learn.  

I was able to get it to work not using the associate option.

$template->param(start_form=>$q->start_form);
$template->param(fname=>$q->textfield(-name=>"fname");
$template->param(submit=>$q->submit(-name=>"go");
$template->param(end_form => $q->end_form);

etc...  sort of like how you said.

Thanks....

Matt

-----Original Message-----
From: Kenny [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 08, 2001 4:12 PM
To: Boex,Matthew W.
Subject: RE: [htmltmpl] FW: [htmltmpl] another question


Matthew,

I think you are a little confused. If you are using HTML::Template you
shouldn't use the start_form(), textfield(), etc, functions at all. Just put
the html directly in your template. like...

your template file:
----snip---

<form action="whatever.cgi">
<input type=text name=listing>
<input type=submit name=by_listing value="Go!">
</form>
---snip----

If you really want to do what you are attempting below.. then you need to
capture the output of the start_form(), etc, functions and pass it to the
template.

Like:

$tokens = {
   'start_form' => $q->start_form(),
   'listing'    => $q->textfield(-name=>"listing"),
   'by_listing' => $q->submit(-name=>"by_listing", -value=>"Go!")
};

$template->param( $tokens ) ;
print $template->output();

--------

However, I suggest that you don't generate any of the html inside your cgi.
That's what HTML::Template is all about, you want to remove all of the HTML
from within your script.

Kenny

> $q->start_form;
> $q->textfield(-name=>"listing");
> $q->submit(-name=>"by_listing", -value=>"Go!");
> $q->end_form;
>
> print $template->output;
>
> now, from there, all i would need to do is call
>
> <TMPL_VAR NAME=start_form> to start the form,
> <TMPL_VAR NAME=listing> for the textbox
> <TMPL_VAR NAME=by_listing> for the submit button, right.?
>
> i did that but still am getting nothing.

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

Reply via email to