On Wed, Jun 24, 2009 at 10:23 PM, Bob Xiong <[email protected]>wrote:
> I'm using CGI and HTML-Template for a web project (to allow user to > update info for a database record). Here is a sample code snippet from > the cgi script and the template. > > # from cgi script > > My $t=HTML::Template->new(filename=>'/path_to_template_file'); > ^^ my > $t->param(fname=>$name_retrieved_from_database); # 'Scott' > $t->param(project=>$project_number_retrieved_from_database); # 'Project 2' there is no reference to project in the template - (no tmpl_var xxx="project") in the option list $t->param(comment=>$comment_retrieved_from_database); # 'project on track' > > # from template > <input type="text" name=""fname" value="<tmpl_var name="fname">"> > <select name="project"> > <option value="project_1">Project 1</option> > <option value="project_2">Project 2</option> > <option value="project_3">Project 3</option> > </select> <textarea name="comment" value="<tmpl_var name="comment">"></textarea> > BUG - the above line will generate something like: <textarea name="comment" value="project on track"></textarea> the "project on track" will only be visible if you do View/Source, not in the browser window, you need the variable contents within the <textarea> .... </textarea> tags <textarea name="comment"><tmpl_var name="comment"></textarea> Mike _______________________________________________ Boston-pm mailing list [email protected] http://mail.pm.org/mailman/listinfo/boston-pm

