$Web Name: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
m (→Syntax) |
||
(6 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:$Web_Name}} | {{DISPLAYTITLE:$Web_Name}} | ||
<span class="pageSubtitle" | <span class="pageSubtitle">Name of isindex or form field</span> | ||
<var>$Web_Name</var> retrieves the name of an isindex or form field in a request. | <var>$Web_Name</var> retrieves the name of an isindex or form field in a request. | ||
Line 7: | Line 7: | ||
==Syntax== | ==Syntax== | ||
<p class="syntax">< | <p class="syntax"><span class="term">%rc</span> = <span class="literal">$Web_Name</span>(<span class="term"> field_number</span> ) | ||
< | </p> | ||
===Syntax terms=== | ===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. | 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== | ==Usage notes== | ||
Line 27: | Line 27: | ||
</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. | <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" <code><form></code> tags and simply to save typing. | ||
</ul> | </ul> | ||
Latest revision as of 22:13, 5 June 2013
Name of isindex or form field
$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
%rc = $Web_Name( field_number )
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.