$Web_IsIndex_Parm_Num_Line

From m204wiki
Revision as of 20:17, 12 June 2012 by Admin (talk | contribs) (1 revision)
Jump to navigation Jump to search

<section begin="desc" />Number of isindex field lines<section end="desc" />


$Web_IsIndex_Parm_Num_Line retrieves the number of lines in an isindex field. It is especially useful for textarea input fields.

$Web_IsIndex_Num_Line is a short synonym for $Web_IsIndex_Parm_Num_Line.

Since isindex fields are more commonly called "URL parameters," you can use another synonym for this $function, $Web_URL_Parm_Num_Line.

Syntax

<section begin="syntax" /> %string = $Web_isIndex_Parm_Num_Line( fieldname, - occurrence ) <section end="syntax" />


$Web_IsIndex_Parm_Num_Line takes two arguments and returns either the number of lines in the isindex field or a 0 indicating either that there were no lines in the isindex field or that some other error has occurred. Possible errors would be the isindex field not being found or the function being invoked on a non-web server thread.

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


A line is considered to be a block of text that is terminated by either an ASCII carriage return (X'0D') or a carriage return followed by a line feed (X'0A'). This is what is ordinarily sent by a browser to mark the end of each line of a textarea input field.

This example checks if the number of lines returned in a textarea exceeds the size of the array meant to hold the input from the textarea.

%LINES = $Web_IsIndex_Parm_Num_Line('COMMENTS') IF %LINES GT %MAXLINES THEN AUDIT 'Maximum lines exceeded for ' WITH - $Web_Hdr_Parm('URL') WITH - ' - input will be truncated' %LINES = %MAXLINES END IF


See also:

  • [[$Web_IsIndex_Parm_Line]]
  • [[$Web_Num_IsIndex]]
  • [[$Web_IsIndex_Name]]
  • [[$Web_IsIndex_Parm_Len]]
  • [[$Web_IsIndex_Parm]]

For a discussion of isindex requests and data, see .