$Web Parm Lstr: Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Created page with "{{DISPLAYTITLE:$Web_Parm_Lstr}} <span class="pageSubtitle"><section begin="desc" />Value of URL parameter or form field to longstring<section end="desc" /></span> $Web_Parm_Lstr...")
 
(Automatically generated page update)
 
(15 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:$Web_Parm_Lstr}}
{{DISPLAYTITLE:$Web_Parm_Lstr}}
<span class="pageSubtitle"><section begin="desc" />Value of URL parameter or form field to longstring<section end="desc" /></span>
<span class="pageSubtitle">Value of URL parameter or form field to longstring</span>
 
<var>$Web_Parm_Lstr</var> retrieves the value of a URL parameter or form field as a [[Longstrings|longstring]]. <var>$Web_Parm_Lstr</var> first looks for isindex fields matching the name, then for matching form fields. <var>$Web_Parm_Lstr</var> can be used instead of <var>[[$Web_IsIndex_Parm_Lstr]]</var> and <var>[[$Web_Form_Parm_Lstr]]</var> to save typing and to make it easy to switch between using "method=GET" and "method=POST"<form> tags.
 
<var>$Web_Parm_Lstr</var> takes two arguments and returns a longstring (or null for any error condition).


$Web_Parm_Lstr retrieves the value of a URL parameter or form field as a longstring. $Web_Parm_Lstr first looks for isindex fields matching the name, then for matching form fields. $Web_Parm_Lstr can be used instead of $Web_IsIndex_Parm_Lstr and $Web_Form_Parm_Lstr to save typing and to make it easy to switch between using "method=GET" and "method=POST"<form> tags.
==Syntax==
==Syntax==
<p class="syntax"><section begin="syntax" /> %STRING = $Web_Parm_Lstr( name, occurrence )
<p class="syntax"><span class="term">%string</span> = <span class="literal">$Web_Parm_Lstr</span>( <span class="term">name</span>, <span class="term">occurrence</span> )
<section end="syntax" /></p>
</p>


 
===Syntax terms===
$Web_Parm_Lstr takes two arguments and returns a longstring (or null for any error condition).
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>name</th>
<tr><th>name</th>
<td>The name of the URL parameter or form field, returned by $Web_IsIndex_Name. This is a required argument if occurrence is not specified; otherwise it is optional.</td></tr>
<td>The name of the URL parameter or form field, returned by <var>[[$Web_IsIndex_Name]]</var>. This is a required argument if occurrence is not specified; otherwise it is optional.</td></tr>
<tr><th>occurrence</th>
<tr><th>occurrence</th>
<td>The occurrence number of a URL parameter or form field, or the occurrence number of the URL parameter or form field matching ''name'', if ''name'' is specified. This is an optional argument if ''name'' is specified; otherwise it is required.
<td>The occurrence number of a URL parameter or form field, or the occurrence number of the URL parameter or form field matching ''name'', if ''name'' is specified. This is an optional argument if ''name'' is specified; otherwise it is required.
</td></tr></table>
</td></tr></table>


 
==Usage notes==
 
<ul>
 
<li>$Web_Parm_Lstr works much like <var>[[$Web_Parm]]</var>, except for the following:
The following statements retrieve the values of the <tt>Moe</tt>,<tt>Larry</tt>, and <tt>Curly</tt> fields into longstrings, regardless of whether these are URL parameters or form fields.
<p class="code"> %moe = $web_form_parm_lstr('MOE')
%larry = $web_form_parm_lstr('LARRY')
%curly = $web_form_parm_lstr('CURLY')
</p>
 
 
$Web_Parm_Lstr works much like $WEB_PARM, except for the following:
<ul>
<ul>
<li>It can return more than 255 bytes of data into a longstring.  
<li>It can return more than 255 bytes of data into a longstring.  
<li>It causes request cancellation if the result would be truncated, either on assignment to the target STRING %variable, or as input to a STRING $function argument or subroutine parameter.  
<li>It causes request cancellation if the result would be truncated, either on assignment to the target STRING %variable, or as input to a STRING $function argument or subroutine parameter.  
<li>It does not have position and length arguments (arguments 3 and 4).
<li>It does not have position and length arguments (arguments 3 and 4).
</ul>
</ul></ul>


==Examples==
The following statements retrieve the values of the <tt>Moe</tt>,<tt>Larry</tt>, and <tt>Curly</tt> fields into longstrings, regardless of whether these are URL parameters or form fields.
<p class="code">%moe = $web_form_parm_lstr('MOE')
%larry = $web_form_parm_lstr('LARRY')
%curly = $web_form_parm_lstr('CURLY')
</p>


$Web_Parm_Lstr is only available in ''[[Sirius Mods]]'' Version 6.7 and later.
==See also==
 
For more information about longstrings, see the ''Sirius Functions Reference Manual''.
 
See also:
<ul>
<ul>
 
<li><var>[[$Web_Parm]]</var>
<li>[[$Web_Parm]]  
<li><var>[[$Web_Name]]</var>
<li>[[$Web_Name]]  
<li><var>[[$Web_Parm_Line]]</var>
<li>[[$Web_Parm_Line]]
</ul>
</ul>




[[Category:Janus Web Server $functions|$Web_Parm_Lstr]]
[[Category:Janus Web Server $functions|$Web_Parm_Lstr]]

Latest revision as of 02:03, 16 April 2013

Value of URL parameter or form field to longstring

$Web_Parm_Lstr retrieves the value of a URL parameter or form field as a longstring. $Web_Parm_Lstr first looks for isindex fields matching the name, then for matching form fields. $Web_Parm_Lstr can be used instead of $Web_IsIndex_Parm_Lstr and $Web_Form_Parm_Lstr to save typing and to make it easy to switch between using "method=GET" and "method=POST"<form> tags.

$Web_Parm_Lstr takes two arguments and returns a longstring (or null for any error condition).

Syntax

%string = $Web_Parm_Lstr( name, occurrence )

Syntax terms

name The name of the URL parameter or form field, returned by $Web_IsIndex_Name. This is a required argument if occurrence is not specified; otherwise it is optional.
occurrence The occurrence number of a URL parameter or form field, or the occurrence number of the URL parameter or form field matching name, if name is specified. This is an optional argument if name is specified; otherwise it is required.

Usage notes

  • $Web_Parm_Lstr works much like $Web_Parm, except for the following:
    • It can return more than 255 bytes of data into a longstring.
    • It causes request cancellation if the result would be truncated, either on assignment to the target STRING %variable, or as input to a STRING $function argument or subroutine parameter.
    • It does not have position and length arguments (arguments 3 and 4).

Examples

The following statements retrieve the values of the Moe,Larry, and Curly fields into longstrings, regardless of whether these are URL parameters or form fields.

%moe = $web_form_parm_lstr('MOE') %larry = $web_form_parm_lstr('LARRY') %curly = $web_form_parm_lstr('CURLY')

See also