$Web Selp Check: Difference between revisions
Jump to navigation
Jump to search
m (1 revision) |
mNo edit summary |
||
Line 2: | Line 2: | ||
<span class="pageSubtitle"><section begin="desc" />Check parameters against a global select element<section end="desc" /></span> | <span class="pageSubtitle"><section begin="desc" />Check parameters against a global select element<section end="desc" /></span> | ||
<var>$Web_Selp_Check</var> validates that each value of a form and/or isindex parameter matches one of the options of a global select element. An overview of the $Web_Sel_xxx functions is provided in <var>[[$Web_Selp]]</var>. | |||
<var>$Web_Selp_Check</var> takes three arguments and returns a numeric result code; for some types of errors, the current <var class="product">User Language</var> request is cancelled. | |||
==Syntax== | ==Syntax== | ||
<p class="syntax"><section begin="syntax" /> %RC = $Web_Selp_Check(global_name, param_name, - | <p class="syntax"><section begin="syntax" /> %RC = $Web_Selp_Check(global_name, param_name, - | ||
Line 12: | Line 11: | ||
<section end="syntax" /></p> | <section end="syntax" /></p> | ||
===Syntax terms=== | |||
<table class="syntaxTable"> | <table class="syntaxTable"> | ||
<tr><th>global_name</th> | <tr><th>global_name</th> | ||
<td>The name of the global select element containing the values to check against. The global select element with this name must have been created by <var>$Web_Save_Sel</var>. This is a required argument.</td></tr> | |||
<tr><th>param_name</th> | <tr><th>param_name</th> | ||
<td>The name of a form and/or an index parameter in the current web request. For each occurrence of this parameter, its value is checked to see if it is equal to one of the values in the options list. This a required argument.</td></tr> | |||
<tr><th>option_keywords</th> | <tr><th>option_keywords</th> | ||
<td>An optional argument that is a string of blank-separated keywords specifying special processing for this $function; it can contain any of the following: | |||
<table class="syntaxTable"> | <table class="syntaxTable"> | ||
<tr><th>CANCHECK</th> | <tr><th>CANCHECK</th> | ||
<td>Cancel request if any value of ''param_name'' not found in select options list</td></tr> | <td>Cancel request if any value of ''param_name'' not found in select options list</td></tr> | ||
<tr><th>NOCAN</th> | <tr><th>NOCAN</th> | ||
<td>Don't cancel request if ''global_name'' not found</td></tr> | <td>Don't cancel request if ''global_name'' not found</td></tr> | ||
<tr><th>NOFORM</th> | <tr><th>NOFORM</th> | ||
<td>Don't look in form parameters</td></tr> | <td>Don't look in form parameters</td></tr> | ||
<tr><th>NOISINDEX</th> | <tr><th>NOISINDEX</th> | ||
<td>Don't look in isindex parameters</td></tr> | <td>Don't look in isindex parameters</td></tr> | ||
<tr><th>NOISI</th> | <tr><th>NOISI</th> | ||
<td>Synonym for NOISINDEX | <td>Synonym for NOISINDEX | ||
</td></tr></table> | </td></tr></table> | ||
</td></tr></table> | </td></tr></table> | ||
===Return codes=== | |||
<table class="syntaxTable"> | <table class="syntaxTable"> | ||
<tr><th>Code</th> | <tr><th>Code</th> | ||
< | <th>Meaning</th></tr> | ||
<tr><th>0</th> | <tr><th>0</th> | ||
<td>'''All''' values of ''param_name'' equal to some value in | <td>'''All''' values of ''param_name'' equal to some value in | ||
global select element ''global_name''.<tr><th>1</th> | global select element ''global_name''. </td></tr> | ||
<td>''Global_name'' not a saved global select element, and NOCAN option</td> | <tr><th>1</th> | ||
<td>''Global_name'' not a saved global select element, and NOCAN option | |||
<td>'''Some''' value of ''param_name'' not equal to any value in | specified.</td></tr> | ||
global select element ''global_name'', and CANCHECK option not specified.<tr><th></th> | <tr><th>2</th> | ||
<td>'''Some''' value of ''param_name'' not equal to any value in | |||
global select element ''global_name'', and CANCHECK option not specified.</td></tr> | |||
<tr><th></th> | |||
<td>Any other error results in cancellation of the <var class="product">User Language</var> request.</td></tr> | <td>Any other error results in cancellation of the <var class="product">User Language</var> request.</td></tr> | ||
</table> | </table> | ||
See [[$Web_Selp]] for an extended example which includes use of $Web_Selp_Check. | ==Examples== | ||
See <var>[[$Web_Selp]]</var> for an extended example which includes use of <var>$Web_Selp_Check</var>. | |||
[[Category:Janus Web Server $functions|$Web_Selp_Check]] | [[Category:Janus Web Server $functions|$Web_Selp_Check]] |
Revision as of 16:16, 15 June 2012
<section begin="desc" />Check parameters against a global select element<section end="desc" />
$Web_Selp_Check validates that each value of a form and/or isindex parameter matches one of the options of a global select element. An overview of the $Web_Sel_xxx functions is provided in $Web_Selp.
$Web_Selp_Check takes three arguments and returns a numeric result code; for some types of errors, the current User Language request is cancelled.
Syntax
<section begin="syntax" /> %RC = $Web_Selp_Check(global_name, param_name, - option_keywords) <section end="syntax" />
Syntax terms
global_name | The name of the global select element containing the values to check against. The global select element with this name must have been created by $Web_Save_Sel. This is a required argument. | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
param_name | The name of a form and/or an index parameter in the current web request. For each occurrence of this parameter, its value is checked to see if it is equal to one of the values in the options list. This a required argument. | ||||||||||
option_keywords | An optional argument that is a string of blank-separated keywords specifying special processing for this $function; it can contain any of the following:
|
Return codes
Code | Meaning |
---|---|
0 | All values of param_name equal to some value in global select element global_name. |
1 | Global_name not a saved global select element, and NOCAN option specified. |
2 | Some value of param_name not equal to any value in global select element global_name, and CANCHECK option not specified. |
Any other error results in cancellation of the User Language request. |
Examples
See $Web_Selp for an extended example which includes use of $Web_Selp_Check.