Lasso Soft Inc. > Home

[client_postParam]

Linkclient_postParam
AuthorKe Carlton
CategoryClient
Version8.x
LicensePublic Domain
Posted04 Oct 2008
Updated04 Oct 2008
More by this author...

Description

This is a modified version of Jason's client_param tag. It has the same functionality but only works with client POST parameters.

Sample Usage

// grab the param
client_postParam('test');

// count param count
client_postParam('test',-count);

// grab a specific instance of a param
client_postParam('test',1);

Source Code

Click the "Download" button below to retrieve a copy of this tag, including the complete documentation and sample usage shown on this page. Place the downloaded ".inc" file in your LassoStartup folder, restart Lasso, and you can begin using this tag immediately.

define_tag:  'postParam',
	-optional 	= 'key', 	-type = 'string',
	-optional     	= 'index',	-type = 'integer',
	-namespace 	= 'client_',
	-priority 	= 'replace',
	-description 	= 'Equivalent of [action_param], only for [client_postParams].';
				        
    if:local_defined('count');
       return(client_postParams->findPosition(#key)->size);
    else;		
	if:local_defined('index');
		protect;
			return(client_postParams->find(#key)->get(#index)->second);
		/protect;
	else;
		local('out') = array;
		iterate:client_postParams->find(#key),local('pair');
			#out->insert(#pair->isA('pair') ? #pair->second | null);
		/iterate;	
		return(#out->join('\r'));
	/if;
    /if;
    return(string);
/define_tag;

Related Tags

Comments

No comments

Please log in to comment

Subscribe to the LassoTalk mail list

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft