$Web Form Parm Lstr: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
mNo edit summary
Line 6: Line 6:
<p class="syntax"><section begin="syntax" /> %STRING = $Web_Form_Parm_Lstr( name, occurrence )
<p class="syntax"><section begin="syntax" /> %STRING = $Web_Form_Parm_Lstr( name, occurrence )
<section end="syntax" /></p>
<section end="syntax" /></p>


$Web_Form_Parm_Lstr takes two arguments and returns a longstring or null for any error condition.
$Web_Form_Parm_Lstr takes two arguments and returns a longstring or null for any error condition.
Line 16: Line 15:
</td></tr></table>
</td></tr></table>


If you have an HTML form defined as follows:


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><center><input type="submit"></center>
  <br><input type="submit">
  </form>
  </form>
</p>
</p>


The following will retrieve the values of the <tt>Foo</tt> and<tt>Bar</tt> fields into longstrings called <tt>%foo</tt> and<tt>%bar</tt>.
The following will retrieve the values of the <tt>Foo</tt> and<tt>Bar</tt> fields into longstrings called <tt>%foo</tt> and<tt>%bar</tt>.
<p class="code"> %foo = $web_form_parm_lstr('FOO')
<p class="code"> %foo = $web_form_parm_lstr('FOO')
  %bar = $web_form_parm_lstr('BAR')
  %bar = $web_form_parm_lstr('BAR')
</p>
</p>


$Web_Form_Parm_Lstr works much like $WEB_FORM_PARM, except for the following:


$Web_Form_Parm_Lstr works much like $WEB_FORM_PARM, except for the following:
<ul>
<ul>
<li>It can return more than 255 bytes of data into a longstring.  
<li>It can return more than 255 bytes of data into a longstring.  
<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 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).
<li>It does not have position and length arguments (arguments 3 and 4).
</ul>
</ul>


$Web_Form_Parm_Lstr is only available in ''[[Sirius Mods]]'' Version 6.7 and later. For more information about longstrings see the ''Sirius Functions Reference Manual''.  
$Web_Form_Parm_Lstr is only available in ''[[Sirius Mods]]'' Version 6.7 and later. For more information about longstrings see the ''Sirius Functions Reference Manual''.  


See also:
See also:
<ul>
<ul>
<li>[[$Web_Form_Parm]]  
<li>[[$Web_Form_Parm]]  
<li>[[$Web_Form_Name]]  
<li>[[$Web_Form_Name]]  
<li>[[$Web_Form_Parm_Line]]
<li>[[$Web_Form_Parm_Line]]
</ul>
</ul>


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

Revision as of 20:52, 22 February 2011

<section begin="desc" />Value of form field to longstring<section end="desc" />

$Web_Form_Parm_Lstr retrieves the value of an HTML form field as a longstring.

Syntax

<section begin="syntax" /> %STRING = $Web_Form_Parm_Lstr( name, occurrence ) <section end="syntax" />

$Web_Form_Parm_Lstr takes two arguments and returns a longstring or null for any error condition.

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.

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 andBar fields into longstrings called %foo and%bar.

%foo = $web_form_parm_lstr('FOO') %bar = $web_form_parm_lstr('BAR')

$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).

$Web_Form_Parm_Lstr is only available in Sirius Mods Version 6.7 and later. For more information about longstrings see the Sirius Functions Reference Manual.

See also: