MiniVend Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Re: Forcing Order of interpolation?




You might want to look up previous discussions of the safe_tag() routine
that you can call in perl blocks.  I think there is something in the
manual too.  This way, you can guide interpolation.

Best,
Kyle




On Sun, 22 Aug 1999, Nicholas Albright wrote:

> ******    message to minivend-users from Nicholas Albright <albrnick@bobcat.ent.ohiou.edu>     ******
> 
> 
>   I was wondering if there was a way of forcing the order of
> interpolation?  Basically, I'm trying to create a fairly dynamic form,
> where the user can enter the number of 'items', and the form will adjust
> to that number of items.  Here is my perl script on that page:
> 
> -----Begin Code-----
> [perl interpolate=1]
> my($string);
> 
> $string = "";
> $string .= "<FORM ACTION=\"[process-target]\" METHOD=\"POST\">\n";
> $string .= "<INPUT TYPE=HIDDEN NAME=mv_doit VALUE=refresh>\n";
> $string .= "<INPUT TYPE=HIDDEN NAME=mv_todo VALUE=refresh>\n";
> $string .= "<INPUT TYPE=HIDDEN NAME=mv_orderpage VALUE=\"thispage\">\n";
> $string .= "Number: ";
> $string .= "<INPUT TYPE=TEXT NAME=num_items VALUE=[value num_items]>\n";
> 
> my($item);
> 
> for $item (1..[value num_items]) {
>   $string .= "<INPUT TYPE=TEXT NAME=name_$item ";
>   $string .= "VALUE=\"[value name_$item]\" SIZE=20>\n";
> }
> 
> $string .= "</FORM>\n";
> 
> return ($string);
> [/perl]
> -----End Code-----
> 
>   My problem occurs in the loop.  I need "$item" to be evaluated before
> [value name_$item].
> 
>   Any ideas?  Or is this not possible, and I need to find another way?
> (Such as running a separate CGI script)
> 
>   Thanks for your time!
>    -Nick
> 
> -- 
> 
> "Laughter is the closest distance between two people."
>                 -- Victor Borge
> 
> 
> -
> To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
> email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
> Archive of past messages: http://www.minivend.com/minivend/minivend-list
> 



Search for: Match: Format: Sort by: