Difference between revisions of "JavaScript built-in Lianja/VFP functions"
From Lianjapedia
Yvonne.milne (Talk | contribs) |
Barrymavin (Talk | contribs) (→Lianja Web Client built-in Lianja/VFP functions) |
||
Line 94: | Line 94: | ||
|valign="top"|md5()||valign="top"|source as string||valign="top"|MD5 encypts the specified string. | |valign="top"|md5()||valign="top"|source as string||valign="top"|MD5 encypts the specified string. | ||
|- | |- | ||
− | |valign="top"|messageBox()||valign="top"|message as string<br>[, options as numeric<br>[, title as string]]||valign="top"|Display a dialog box and | + | |valign="top"|messageBox()||valign="top"|message as string<br>[, options as numeric<br>[, title as string, [okcallback as function[, cancel callback as function]]]]||valign="top"|Display a dialog box and continues execution. If the callback functions are specified they are called on clicking a button. |
|- | |- | ||
|valign="top"|month()||valign="top"|source as date||valign="top"|Function to return the month from the specified date as a numeric. | |valign="top"|month()||valign="top"|source as date||valign="top"|Function to return the month from the specified date as a numeric. |
Revision as of 23:24, 23 February 2019
Lianja Web Client built-in Lianja/VFP functions
The following Lianja/VFP functions are included in the Lianja HTML5 Client API for JavaScript.
Function | Arguments | Description |
---|---|---|
addslashes() | arg as string | Quote string with slashes. |
alltrim() | arg as string | Remove leading and trailing spaces. |
at() | substring as string, source as string [, start as numeric] |
Search for substring and return position. |
base64_decode() | text as string | Function to decode a text string from MIME base64. |
base64_encode() | text as string | Function to encode a text string to MIME base64. |
between() | value as expression, low as expression, high as expression |
Function to check that a given value is within a given range. |
cdow() | source as date | Function to return the day of the week from the specified date as a string. |
chrtran() | source as string, find as string, replacewith as string |
Function to replace text within a string. |
cmonth() | source as date | Function to return the month from the specified date as a string. |
createObject() | class as string | Create new object based on the specified UI class. |
ctod() | source as string | Function to return the specified string as a date. |
date() | [year as numeric, month as numeric, day as numeric] |
Function to return system or the specified date as a date. |
day() | source as date | Function to return the day of the month from the specified date as a numeric. |
dow() | source as date | Function to return the day of the week from the specified date as a numeric. |
dtoc() | source as date | Function to return the specified date as a string. |
dtos() | source as date | Function to return the specified date as a string in the format YYYYMMDD. |
empty() | arg as expression | Returns true if the given expression is empty, i.e. an empty string, a numeric zero or a boolean false. |
endsWith() | source as string, substring as string |
Check if source string ends with substring. |
etos() | source as expr [, length as numeric] |
Evaluate expression and return it as a string, optionally specifying length. |
explode() | separator as expression, string as expression |
Returns an array by splitting the given string up as specified by the given separator. |
function_exists() | arg as string | Returns true if the specified function is declared. |
guid() | none | Returns a GUID. |
icase() | condition as logical, result as expr [, ...] [, otherwiseresult] |
Execute immediate case statement. Evaluates a condition then if it is true returns the next argument in the argument list. If no conditions are true returns the otherwiseresult. |
iif() | condition as logical, expression1 as exp, expression2 as exp |
Execute an immediate if. Returns expression1 if condition is true otherwise returns expression2. |
implode() | separator as expression, array as expression |
Returns a string of all items in the given array separated by the given separator. |
in_array() | value as expression, array as expression |
Returns true if the given value is in the specified array. |
indexOf() | source as string, substring as string |
Search for substring and return position. |
inlist() | source as string, list as string |
Check if source string is contained in a list of arguments. |
is_array() | arg as expression | Returns true if the given arg is an array. |
is_date() | arg as expression | Returns true if the given arg is a date. |
is_float() | arg as expression | Returns true if the given arg is a number. |
is_function() | arg as expression | Returns true if the given arg is a function. |
is_int() | arg as expression | Returns true if the given arg is a number. |
is_logical() | arg as expression | Returns true if the given arg is a boolean. |
is_numeric() | arg as expression | Returns true if the given arg is a number. |
is_object() | arg as expression | Returns true if the given arg is an object. |
is_string() | arg as expression | Returns true if the given arg is a string. |
len() | source as expr [, options as logical] |
Return length of expression. |
loadlibrary() | fileURL.js as string | Load the specified JavaScript file. |
lower() | arg as string | Convert to lower case. |
lpad() | source as string, length as numeric [, padchar as string] |
Pad string to defined length from left. |
ltrim() | source as string | Remove leading spaces. |
md5() | source as string | MD5 encypts the specified string. |
messageBox() | message as string [, options as numeric [, title as string, [okcallback as function[, cancel callback as function]]]] |
Display a dialog box and continues execution. If the callback functions are specified they are called on clicking a button. |
month() | source as date | Function to return the month from the specified date as a numeric. |
padl() | source as string, length as numeric [, padchar as string] |
Pad string to defined length from left. |
padr() | source as string, length as numeric [, padchar as string] |
Pad string to defined length from right. |
proper() | source as string | Convert to proper case. |
reccount() | alias as string | Return record count. |
recno() | alias as string | Return current record number. |
replicate() | arg as expression, count as expression |
Returns a string which is a replication of the given arg 'count' times. |
require() | jsfileURL as string | Load the specified JavaScript file. |
require_once() | jsfileURL as string | Load the specified JavaScript file (if not already loaded). |
rowcount() | alias as string | Return row count (excludes deleted and those not matching current filter). |
rpad() | source as string, length as numeric [, padchar as string] |
Pad string to defined length from right. |
rtrim() | source as string | Remove trailing spaces. |
startsWith() | source as string, substring as string |
Check if source string starts with substring. |
str() | source as numeric [, width as numeric [, decimals as numeric]] |
Convert numeric to string. |
strlen() | source as expr [, options as logical] |
Return length of expression. |
strtran() | source as string, find as string, replacewith as string |
Function to replace text within a string. |
str_replace() | substring as string, replacestring as string, source as string |
Search for substring and replace with replacestring in source. |
substr() | source as string, start as numeric [, end as numeric] |
Extract substring. |
time() | none | Function to return current system time. |
tostring() | arg as expression | Returns the given arg as a string type. |
trim() | arg as string | Remove leading and trailing spaces. |
upper() | arg as string | Convert to upper case. |
val() | arg as string | Convert string to numeric. |
year() | arg as date | Function to return the year from the specified date as a numeric. |