$Web IsIndex Parm Lstr: Difference between revisions
Jump to navigation
Jump to search
m (1 revision) |
(Automatically generated page update) |
||
(18 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:$Web_IsIndex_Parm_Lstr}} | {{DISPLAYTITLE:$Web_IsIndex_Parm_Lstr}} | ||
<span class="pageSubtitle" | <span class="pageSubtitle">Value of URL parameter to longstring</span> | ||
$Web_IsIndex_Parm_Lstr retrieves the value of a URL parameter as a longstring. | <var>$Web_IsIndex_Parm_Lstr</var> retrieves the value of a URL parameter as a [[Longstrings|longstring]]. | ||
Since isindex fields are more commonly called "URL parameters," you may want to use the synonym for this $function, <var>[[$Web_URL_Parm_Lstr]]</var>. | |||
<var>$Web_IsIndex_Parm_Lstr</var> takes two arguments and returns a longstring (or null for any error condition). | |||
==Syntax== | ==Syntax== | ||
<p class="syntax">< | <p class="syntax"><span class="term">%string</span> = <span class="literal">$Web_IsIndex_Parm_Lstr</span>( <span class="term">name</span>, <span class="term">occurrence</span> ) | ||
< | </p> | ||
===Syntax terms=== | |||
<table class="syntaxTable"> | <table class="syntaxTable"> | ||
<tr><th>name</th> | <tr><th>name</th> | ||
<td>The name of the URL parameter, 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, 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 the occurrence number of the URL parameter matching ''name'', if ''name'' is specified. This is an optional argument if | <td>The occurrence number of a URL parameter, or the occurrence number of the URL parameter matching ''name'', if ''name'' is specified. This is an optional argument if <var class="term">name</var> is specified; otherwise it is required. | ||
</td></tr></table> | </td></tr></table> | ||
==Usage notes== | |||
<ul> | |||
<li><var>$Web_IsIndex_Parm_Lstr</var> works much like <var>$Web_IsIndex_Parm</var>, except for the following: | |||
< | |||
</ | |||
<ul> | <ul> | ||
Line 36: | Line 29: | ||
<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== | |||
If you have a URL that looks like: | |||
<p class="code">http://myhost.edu/whatever?war=peace&love=hate | |||
</p> | |||
The following will retrieve the values of the <code>War</code> and<code>Love</code> fields into longstrings called <code>%war</code> and<tt>%love</tt>. | |||
<p class="code">%war = $web_form_parm_lstr('WAR') | |||
%love = $web_form_parm_lstr('LOVE') | |||
</p> | |||
See also | ==See also== | ||
<ul> | <ul> | ||
<li><var>[[$Web_IsIndex_Parm]]</var> | |||
<li>[[$Web_IsIndex_Parm]] | <li><var>[[$Web_IsIndex_Name]]</var> | ||
<li>[[$Web_IsIndex_Name]] | <li><var>[[$Web_IsIndex_Parm_Line]]</var> | ||
<li>[[$Web_IsIndex_Parm_Line]] | |||
</ul> | </ul> | ||
[[Category:Janus Web Server $functions|$Web_IsIndex_Parm_Lstr]] | [[Category:Janus Web Server $functions|$Web_IsIndex_Parm_Lstr]] |
Latest revision as of 02:03, 16 April 2013
Value of URL parameter to longstring
$Web_IsIndex_Parm_Lstr retrieves the value of a URL parameter as a longstring.
Since isindex fields are more commonly called "URL parameters," you may want to use the synonym for this $function, $Web_URL_Parm_Lstr.
$Web_IsIndex_Parm_Lstr takes two arguments and returns a longstring (or null for any error condition).
Syntax
%string = $Web_IsIndex_Parm_Lstr( name, occurrence )
Syntax terms
name | The name of the URL parameter, 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 the occurrence number of the URL parameter matching name, if name is specified. This is an optional argument if name is specified; otherwise it is required. |
Usage notes
- $Web_IsIndex_Parm_Lstr works much like $Web_IsIndex_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
If you have a URL that looks like:
http://myhost.edu/whatever?war=peace&love=hate
The following will retrieve the values of the War
andLove
fields into longstrings called %war
and%love.
%war = $web_form_parm_lstr('WAR') %love = $web_form_parm_lstr('LOVE')