Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
I wasn't able to post the actual code sooner because I didn't have my laptop where the code was. I know this post is a bit late, so I hope someone who knows more than me sees this.
sub build_evntype { my @event_entries; my @event_list=("Event1", "Event2"); my $p_event = shift; for (my $i=0; $i<=$#event_list; $i++) { my $event_data={}; $$event_data{"t_event"}=$event_list[$i]; $$event_data{"n_event"}=$i+1; if ($i+1 == $p_event) { $$event_data{"sel"} = "selected"; } push (@event_entries, $event_data); } return \@event_entries; }
I am using the same type of code to build 6 other select lists in my template, and they all work fine.

To fix my problem, I didn't touch the code, I just changed the name of the TMPL_LOOP, and it worked. I agree that it doesn't make sense, I am only interpreting the information I have at hand.

Thanks for all your insight,
digger

In reply to Re: HTML:Template Limitation? by digger
in thread HTML:Template Limitation? by digger

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2024-04-26 02:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found