Link | client_param_9 |
Author | Jolle Carlestam |
Category | Client |
Version | 9.x |
License | Public Domain |
Posted | 13 Oct 2009 |
Updated | 13 Oct 2009 |
More by this author... |
A replacement for action_param. Retains its value even when used inside inlines. Returns the value of a client GET/POST parameter Inspired by Bil Corrys lp_client_param Requires the tag client_params. (On Tagswap called client_params_9.)
client_param('my'); client_param('my', 2); client_param('my', 'get'); client_param('my', 2, 'post'); client_param('my', -count); client_param('my', 'get', -count);
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.
{ return client_param(#param, -1, '', -count=#count); } define client_param(param::string, method::string, -count::boolean = false) => { return client_param(#param, -1, #method, -count=#count); } define client_param(param::string, index::integer, method::string = '', -count::boolean = false) => { local(output) = array; client_params(#method) -> foreach => { (#1 -> type == 'pair' && #param == #1 -> name) ? #output -> insert(#1 -> value); } #count ? return #output -> size; #index <= 0 ? return #output -> join('\r'); #index > 0 && #output -> size >= #index ? return #output -> get(#index); return string; } ?>
No comments
©LassoSoft Inc 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft