$Web Parm Len: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
mNo edit summary
Line 4: Line 4:




$Web_Len retrieves the length of an isindex or form field in a request. $Web_Parm_Len is a somewhat more syntactically correct synonym for $Web_Len.
<var>$Web_Len</var> retrieves the length of an isindex or form field in a request. <var>$Web_Parm_Len</var> is a somewhat more syntactically correct synonym for <var>$Web_Len</var>.
 
<var>$Web_Len</var> takes two arguments and returns a number, or it returns zero if the field does not exist.
 
==Syntax==
==Syntax==
<p class="syntax"><section begin="syntax" /> %RC = $WEB_[PARM_]LEN( fieldname, occurrence )
<p class="syntax"><section begin="syntax" />%rc = $Web_[Parm_]Len( fieldname, occurrence )
<section end="syntax" /></p>
<section end="syntax" /></p>


 
===Syntax terms===
$Web_Len takes two arguments and returns a number, or zero if the field does not exist.
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>fieldname</th>
<tr><th>fieldname</th>
<td>The name of the isindex or form field, returned by $Web_Name. Required argument if occurrence not specified, otherwise optional.</td></tr>
<td>The name of the isindex or form field, returned by <var>[[$Web_Name]]</var>. Required argument if <var class="term">occurrence</var> not specified, otherwise optional.</td></tr>
<tr><th>occurrence</th>
<tr><th>occurrence</th>
<td>The occurrence number of an isindex or form field, or the occurrence number of the isindex or form field matching 'fieldname', if fieldname is specified. Optional argument if fieldname is specified, otherwise it is required.
<td>The occurrence number of an isindex or form field, or the occurrence number of the isindex or form field matching <var class="term">fieldname</var>, if <var class="term">fieldname</var> is specified. Optional argument if <var class="term">fieldname</var> is specified, otherwise it is required.
</td></tr></table>
</td></tr></table>


==Usage notes==
<ul>
<li><var>$Web_Len</var> first looks for isindex fields matching the name, then for matching form fields.
<li>$Web_Len can be used instead of <var>[[$Web_IsIndex_Len]]</var> and <var>$Web_Form_Len</var> to make it easy to switch between using "method=GET" and "method=POST" <form> tags, as well as simply to save typing. </ul>


$Web_Len first looks for isindex fields matching the name, then for matching form fields. $Web_Len can be used instead of $Web_IsIndex_Len and <var>$Web_Form_Len</var> to make it easy to switch between using "method=GET" and "method=POST"<form> tags and simply to save typing.
==See also==
 
See also:
<ul>
<ul>
 
<li><var>[[$Web_Name]]</var>
<li>[[$Web_Name]]  
<li><var>[[$Web_Parm]]</var>
<li>[[$Web_Parm]]  
<li><var>[[$Web_Num]]</var>
<li>[[$Web_Num]]  
<li><var>[[$Web_Form_Parm_Len]]</var>
<li>[[$Web_Form_Parm_Len]]  
<li><var>[[$Web_IsIndex_Parm_Len]]</var>
<li>[[$Web_IsIndex_Parm_Len]]
</ul>
</ul>




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

Revision as of 21:45, 6 June 2012

<section begin="desc" />Length of isindex or form field<section end="desc" />


$Web_Len retrieves the length of an isindex or form field in a request. $Web_Parm_Len is a somewhat more syntactically correct synonym for $Web_Len.

$Web_Len takes two arguments and returns a number, or it returns zero if the field does not exist.

Syntax

<section begin="syntax" />%rc = $Web_[Parm_]Len( fieldname, occurrence ) <section end="syntax" />

Syntax terms

fieldname The name of the isindex or form field, returned by $Web_Name. Required argument if occurrence not specified, otherwise optional.
occurrence The occurrence number of an isindex or form field, or the occurrence number of the isindex or form field matching fieldname, if fieldname is specified. Optional argument if fieldname is specified, otherwise it is required.

Usage notes

  • $Web_Len first looks for isindex fields matching the name, then for matching form fields.
  • $Web_Len can be used instead of $Web_IsIndex_Len and $Web_Form_Len to make it easy to switch between using "method=GET" and "method=POST" <form> tags, as well as simply to save typing.

See also