[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
RE: [mv] multiple page arguments
Some thing like on the calling page:
[area href="mypage" arg="myarg1,myarg2"]
And then this on the called page:
[perl scratch]
my $arg = &tag_data('session', 'arg');
my @a = split(",", $arg);
$Safe{'scratch'}{'myscratch1'} = @a[0];
$Safe{'scratch'}{'myscratch2'} = @a[1];
[/perl]
Then the vars are with:
[scratch myscratch1]
[scratch myscratch2]
The Perl is kind of clunky, but it shows the basic steps. I am sure some
Perl guru give some better code, or even better a standard UserTag that
works just like split. Hope this helps.
> -----Original Message-----
> From: owner-minivend-users@minivend.com
> [mailto:owner-minivend-users@minivend.com]On Behalf Of Nick Pleis
> Sent: Thursday, November 11, 1999 3:02 PM
> To: minivend-users@minivend.com
> Subject: [mv] multiple page arguments
>
>
> ****** message to minivend-users from "Nick Pleis"
> <npleis@cei.net> ******
>
> Hey,
>
>
> When passing information from an [area..] tag I need to be able to pass
> multiple elements. Each of these elements corresponds to a
> database field,
> and need to be used seperately.
>
> Say that I have a category and sub-category. I need to be able to pass a
> string identifying both the category and the sub caetgory. I
> know that I can
> just
> create a single string out of these and pass them as [area herf="yep"
> arg=that_created_string] where that_created_string contains
> the category
> and sub-category concanteated together.
>
> The problem is, how do I break them apart and use them seperately on the
> next page?
>
> Is there a standard way to pass these things?
>
> Thanks in advance,
>
> Nick
>
> -
> 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
>