$Web Name: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
mNo edit summary
Line 2: Line 2:
<span class="pageSubtitle"><section begin="desc" />Name of isindex or form field<section end="desc" /></span>
<span class="pageSubtitle"><section begin="desc" />Name of isindex or form field<section end="desc" /></span>


<var>$Web_Name</var> retrieves the name of an isindex or form field in a request.


<var>$Web_Name</var> takes a single argument and returns a string or null if the number references a non-existing field.


$Web_Name retrieves the name of an isindex or form field in a request.
==Syntax==
==Syntax==
<p class="syntax"><section begin="syntax" /> %RC = $Web_Name( field_number )
<p class="syntax"><section begin="syntax" />%rc = $Web_Name( field_number )
<section end="syntax" /></p>
<section end="syntax" /></p>


 
===Syntax terms===
$Web_Name takes a single argument and returns a string or null if the number references a non-existing field.
 
The only parameter is the number of the isindex or form field for which the name is being requested. This parameter must be specified.  
The only parameter is the number of the isindex or form field for which the name is being requested. This parameter must be specified.  


$Web_Name is useful when writing generic server applications, when the server does not know what field name exists at a particular location in an isindex or form request.
==Usage notes==
<p class="code"> * Get the number of isindex or form fields.
<ul>
<li><var>$Web_Name</var> is useful when writing generic server applications, when the server does not know what field name exists at a particular location in an isindex or form request. For example:
<p class="code">&#42; Get the number of isindex or form fields.
   
   
%X = $Web_Num
%x = $Web_Num
   
   
* Load the field names into an array.
&#42; Load the field names into an array.
   
   
FOR %Y FROM 1 TO %X
For %y From 1 To %x
%FIELD(%Y) = $Web_Name(%Y)
%field(%y) = $Web_Name(%y)
END FOR
End For
</p>
</p>


<li><var>$Web_Name</var> first counts isindex fields and then form fields. <var>$Web_Name</var> can be used instead of <var>$Web_IsIndex_Name</var> and <var>$Web_Form_Name</var> to make it easy to switch between using "method=GET" and "method=POST" <form> tags and simply to save typing.
</ul>


$Web_Name first counts isindex fields and then form fields. $Web_Name can be used instead of $Web_IsIndex_Name and <var>$Web_Form_Name</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_Parm_Len]]</var>
<li>[[$Web_Parm_Len]]  
<li><var>[[$Web_Parm]]</var>
<li>[[$Web_Parm]]  
<li><var>[[$Web_Num]]</var>
<li>[[$Web_Num]]  
<li><var>[[$Web_Form_Name]]</var>
<li>[[$Web_Form_Name]]  
<li><var>[[$Web_IsIndex_Name]]</var>
<li>[[$Web_IsIndex_Name]]
</ul>
</ul>


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

Revision as of 22:21, 6 June 2012

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

$Web_Name retrieves the name of an isindex or form field in a request.

$Web_Name takes a single argument and returns a string or null if the number references a non-existing field.

Syntax

<section begin="syntax" />%rc = $Web_Name( field_number ) <section end="syntax" />

Syntax terms

The only parameter is the number of the isindex or form field for which the name is being requested. This parameter must be specified.

Usage notes

  • $Web_Name is useful when writing generic server applications, when the server does not know what field name exists at a particular location in an isindex or form request. For example:

    * Get the number of isindex or form fields. %x = $Web_Num * Load the field names into an array. For %y From 1 To %x %field(%y) = $Web_Name(%y) End For

  • $Web_Name first counts isindex fields and then form fields. $Web_Name can be used instead of $Web_IsIndex_Name and $Web_Form_Name to make it easy to switch between using "method=GET" and "method=POST" <form> tags and simply to save typing.

See also