shockme has asked for the wisdom of the Perl Monks concerning the following question:
I'm in the process of using my second template (ever), and I've run into a problem. It might be perl-related, or it could turn out to be just an HTML problem. I've stared at the script and template until I'm cross-eyed, and I just can't find the problem. You can see the script execute here.
The problem occurs in the textarea box below the Title. There's nothing there. What I'm expecting to see is this:
If you view source, it's there. But it's not being displayed in the form.Title: Test Node #1 It might someday have something about perl or slashdot or [http://www. +thespark.com] or [http://www.ttuhsc.edu|ttuhsc] or anything I want.
The script looks like this:
The template is in my scratch pad. (For some reason, it would not display properly here.)#!/usr/bin/perl -w use strict; use CGI qw/:all/; use exitwound::AccessData qw(&accessData); use HTML::Template; $|++; # disable buffering my $q = new CGI; my $NodeID = $q->param( "NodeID" ); my $ActionName = $q->param( "ActionName" ); my $NodeTitle = $q->param( "NodeTitle" ); my $NodeDate = $q->param( "NodeDate" ); my $NodeSection= $q->param( "NodeSection" ); my $NodeAuthor = $q->param( "NodeAuthor" ); my $NodeContent= $q->param( "NodeContent" ); if (($NodeID) and ($ActionName eq "Modify")) { $ActionName = "Update"; } elsif ($NodeID) { $ActionName = "Modify"; } else { $ActionName = "Insert"; $NodeID = "Unspecified"; } my @DisplayContent; ($NodeID, $NodeTitle, $NodeDate, $NodeSection, $NodeAuthor, $NodeConte +nt, @DisplayContent) = accessData($NodeID, $NodeTitle, $NodeDate, $NodeSection, $NodeAu +thor, $ActionName, $NodeContent); my $template = HTML::Template->new(filename => 'templates/mod-node.tmp +l'); $template->param(NodeSection => $NodeSection, NodeTitle => $NodeTitle, NodeAuthor => $NodeAuthor, NodeDate => $NodeDate, NodeContent => $NodeContent, ActionName => $ActionName, DisplayContent => @DisplayContent, ); print $template->output;
Any advice or insight as to why nothing is being displayed in the textarea box would be greatly appreciated.
Thanks.
If things get any worse, I'll have to ask you to stop helping me.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: HTML::Template Problem
by grep (Monsignor) on Mar 27, 2002 at 04:05 UTC | |
by shockme (Chaplain) on Mar 27, 2002 at 04:11 UTC | |
by tomhukins (Curate) on Mar 27, 2002 at 15:06 UTC | |
Re: HTML::Template Problem
by gav^ (Curate) on Mar 27, 2002 at 04:39 UTC | |
by tomhukins (Curate) on Mar 27, 2002 at 14:58 UTC | |
Re: HTML::Template Problem
by jlongino (Parson) on Mar 27, 2002 at 06:03 UTC | |
by PrakashK (Pilgrim) on Mar 27, 2002 at 16:29 UTC | |
Re: HTML::Template Problem
by Anonymous Monk on Mar 27, 2002 at 04:02 UTC | |
Re: HTML::Template Problem
by dws (Chancellor) on Mar 27, 2002 at 04:03 UTC | |
by shockme (Chaplain) on Mar 27, 2002 at 04:07 UTC | |
by dws (Chancellor) on Mar 27, 2002 at 04:10 UTC | |
by Anonymous Monk on Mar 27, 2002 at 04:10 UTC | |
by Smylers (Pilgrim) on Mar 27, 2002 at 11:08 UTC |
Back to
Seekers of Perl Wisdom