$Web Form Parm Lstr: Difference between revisions
Jump to navigation
Jump to search
(Created page with "{{DISPLAYTITLE:$Web_Form_Parm_Lstr}} <span class="pageSubtitle"><section begin="desc" />Value of form field to longstring<section end="desc" /></span> $Web_Form_Parm_Lstr retrie...") |
No edit summary |
||
(20 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:$Web_Form_Parm_Lstr}} | {{DISPLAYTITLE:$Web_Form_Parm_Lstr}} | ||
<span class="pageSubtitle">< | <span class="pageSubtitle">Value of form field to longstring</span> | ||
<var>$Web_Form_Parm_Lstr</var> retrieves the value of an HTML form field as a [[Longstrings|longstring]]. | |||
<var>$Web_Form_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_Form_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 form field, returned by $Web_Form_Name. Required argument if occurrence is not specified, otherwise optional.</td></tr> | <td>The name of the form field, returned by <var>$Web_Form_Name</var>. Required argument if occurrence is not specified, otherwise optional.</td></tr> | ||
<tr><th>occurrence</th> | <tr><th>occurrence</th> | ||
<td>The occurrence number of a form field, or the occurrence number of the 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 form field, or the occurrence number of the 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><var>$Web_Form_Parm_Lstr</var> works much like <var>$Web_Form_Parm</var>, except for the following: | |||
<ul> | |||
<li>It can return more than 255 bytes of data into a <var>Longstring</var>. | |||
<li>It causes request cancellation if the result would be truncated, either on assignment to a 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). | |||
</ul></ul> | |||
==Examples== | |||
If you have an HTML form defined as follows: | |||
<p class="code"> <form method="POST" action="myUrl"> | <p class="code"> <form method="POST" action="myUrl"> | ||
<br>Foo:<input type="text" name="foo" size="20"> | <br>Foo:<input type="text" name="foo" size="20"> | ||
<br>Bar:<input type="text" name="bar" size="20"> | <br>Bar:<input type="text" name="bar" size="20"> | ||
<br | <br><input type="submit"> | ||
</form> | </form> | ||
</p> | </p> | ||
The following will retrieve the values of the < | The following will retrieve the values of the <code>Foo</code> and <code>Bar</code> fields into longstrings called <code>%foo</code> and<code>%bar</code>. | ||
<p class="code"> %foo = $web_form_parm_lstr('FOO') | |||
<p class="code">%foo = $web_form_parm_lstr('FOO') | |||
%bar = $web_form_parm_lstr('BAR') | |||
</p> | </p> | ||
==See also== | |||
<ul> | <ul> | ||
<li><var>[[$Web_Form_Parm]]</var> | |||
<li> | <li><var>[[$Web_Form_Name]]</var> | ||
<li> | <li><var>[[$Web_Form_Parm_Line]]</var> | ||
<li> | <li><var>[[$Web_Form_Parm_Binary]]</var> | ||
</ul> | </ul> | ||
[[Category:Janus Web Server $functions|$Web_Form_Parm_Lstr]] | [[Category:Janus Web Server $functions|$Web_Form_Parm_Lstr]] |
Latest revision as of 04:14, 20 February 2020
Value of form field to longstring
$Web_Form_Parm_Lstr retrieves the value of an HTML form field as a longstring.
$Web_Form_Parm_Lstr takes two arguments and returns a longstring or null for any error condition.
Syntax
%string = $Web_Form_Parm_Lstr( name, [occurrence] )
Syntax terms
name | The name of the form field, returned by $Web_Form_Name. Required argument if occurrence is not specified, otherwise optional. |
---|---|
occurrence | The occurrence number of a form field, or the occurrence number of the form field matching name, if name is specified. This is an optional argument if name is specified; otherwise it is required. |
Usage notes
- $Web_Form_Parm_Lstr works much like $Web_Form_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 a 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 an HTML form defined as follows:
<form method="POST" action="myUrl">
Foo:<input type="text" name="foo" size="20">
Bar:<input type="text" name="bar" size="20">
<input type="submit">
</form>
The following will retrieve the values of the Foo
and Bar
fields into longstrings called %foo
and%bar
.
%foo = $web_form_parm_lstr('FOO') %bar = $web_form_parm_lstr('BAR')