Asp functions



GeneralConversion(...) | source | documentation
This function converts the contents of a text based file (eg .bat .txt .asp .htm) according to certain rules which are supplied in a database table. The rules are regular expressions or search strings. The original file is unchanged and the converted contents are saved in another file.

fnCheckForField(...) | source | documentation
This function searches a particular recordset for the presence of a particular field. The function returns a boolean value.

fnCompareStrings(...) | source | documentation
This function compares two strings and returns true if they are the same and false if they are not. Two optional parameters are available to determine conditions of the comparison.

fnConnectToDatabase(...) | source | documentation
This function establishes an ADO connection to a database and provides error handling The function return an ADO connection

fnConvertArray(...) | source | documentation
This function takes a one or two dimensional VBscript array or a Jscript array as an argument and returns a Jscript array. Jscript arrays are left unchanged.

fnConvertTwoDimArray(...) | source | documentation
This function converts a VBscript two dimensional into a Jscript two dimensional array- make this function a parameter of the fnConvertArray function

fnDataRADIO(...) | source | documentation
This function returns an HTML string which is a databound HTML RADIO box. The box is bound to a query string which is passed to the function.

fnDataSELECT(...) | source | documentation
This function returns an HTML string which is a databound HTML SELECT box. The box is bound to a query string (or table name or stored procedure string) which is passed to the function.

fnDatePicker(...) | source | documentation
This function returns an html string which generates three SELECT boxes (day, month, year) and a HIDDEN element on a web page which provide a simple mechanism for a user to select Date values. The boxes prevent the entry of illegal dates (e.g 29 Feb 1999). The hidden element remains synchronised to the combined value of the three SELECT boxes.

fnDbugFileContent(...) | source | documentation
This function displays the contents of two text based files in a webpage

fnDbugFileContentDOC(...) | source | documentation
This function displays the contents of two text based files in a webpage

fnDbugFormContents(...) | source | documentation
This function displays the contents of a Submitted HTML Form on a web page and over-rides any other content. The contents are formatted in a tabular manner. This function is going to be combined in a 'Super' debug function which includes all other dbug functions as well

fnDbugOneDimArray(...) | source | documentation
This function displays the values of a one dimensional array on a web page.

fnDbugQueryStringContents(...) | source | documentation
This function displays the contents of an HTML querystring and erases all other content on the page

fnDbugRecordset(...) | source | documentation
This function displays the contents of an ADO recordset on a blank webpage. All further output is terminated

fnDbugTwoDimArray(...) | source | documentation
This function

fnDebug(...) | source | documentation
This function combines the functions fnDbugFileContents, fnDbugRecordset, fnDbugString, dbug, fnDbugFormContents, 'fnDbugQueryString' into one function

fnDisplay(...) | source | documentation
This function is a close parallel to the fnDebug function, but instead of terminating all html output with response.end it allows other content to appear on a page. It can be used to display a string, a set of Form Contents, a set of QueryString contents the contents of a File or two, an ActiveX Data Objects recordset, and possibly more than that fnDbugFileContents, fnDbugRecordset, fnDbugString, dbug, fnDbugFormContents, 'fnDbugQueryString' into one function

fnDisplayRecordset(...) | source | documentation
This function displays the contents of an ADO recordset on a webpage. A number of formatting options are available. The function also can make the first data column into a query string which can be used to link to another page. The query string (should) contain the values of the primary key fields (so that that record can be selected again in another page). An alternating colour for each row of the recordset can be specified, as can other formatting options. The default 'field-name' column headings can be replaced with new column headings SYNTAX : The colour formatting parameter does not appear to working b) DATE: 13th Dec 2000 : The query string does not extract the primary key for the table

fnDisplayRecordsetDOC(...) | source | documentation
This function displays the contents of an ADO recordset on a webpage. A number of formatting options are available. The function also can make the first data column into a query string which can be used to link to another page. The query string (should) contain the values of the primary key fields (so that that record can be selected again in another page). An alternating colour for each row of the recordset can be specified, as can other formatting options. The default 'field-name' column headings can be replaced with new column headings SYNTAX : The colour formatting parameter does not appear to working b) DATE: 13th Dec 2000 : The query string does not extract the primary key for the table c) DATE: 13th Dec 2000 : If the hyperlinked field has an Alias in the Sql query then that alias is used by the hyperlink (instead of the true column/field name) d) DATE: 13th Dec 2000 : The function doesn't handle 'no-data' very well (may be should have a parameter for

fnErrorMessage(...) | source | documentation
This function displays an error message on a web page in a table format with the following information: the function name, the parameter name and the description of the error which occurred. SYNTAX : A required parameter was omitted from the function.

fnFormatDate(...) | source | documentation
This function takes a date data type or a string in date format and returns a string value formatted as '3 Mar 1999'

fnFormatWebSource(...) | source | documentation
This function format the source file of a web page (html or asp) and returns a new file which contains a formatted version of the old file. This formatting means indenting table tags properly, ensuring that only two attribute values at most are contained on any one line, and that the attribute equal signs all line up. (this is my personal preference for formatting)

fnHtmlDisplay(...) | source | documentation
This function formats a text string for display on a web page by converting whitespace characters to the appropriate Html equivalent.

fnIntersectionOfSets(...) | source | documentation
This function compares two arrays or string lists and returns an array of all members which are common to both. The string lists are parsed into their elements.

fnIsLeapYear(...) | source | documentation
This function tests a four digit year and returns a boolean value depending on whether the year is a leap year or not

fnRemoveSpaces(...) | source | documentation
This function removes spaces, tabs, form feed, carriage returns from a strng

fnSR(...) | source | documentation
See fnDisplayRecord instead This function returns an HTML string to display one record from a database table on a webpage. The record is formatted as an HTML table. The labels for the fields of the data can be specified as can the colours used in the display.

fnShowRecord(...) | source | documentation
See fnDisplayRecord instead This function returns an HTML string to display one record from a database table on a webpage. The record is formatted as an HTML table. The labels for the fields of the data can be specified as can the colours used in the display.

fnSimpleDisplayRecordset(...) | source | documentation
See fnDisplayRecordset instead This function displays the contents of an ADO recordset on a webpage.

fnSimpleUpdateRecord(...) | source | documentation
This function returns an HTML string to display and update one record from a database table on a webpage. The record is formatted as an HTML table. The labels for the fields of the data can be specified as can the colours used in the display.

fnTestSetIdentity(...) | source | documentation
This function compares two Sets (ie either Arrays or String Lists) or a value and a Set and tests if the sets are identical. .

fnTestSetMembership(...) | source | documentation
This function compares two Sets (ie either Arrays or String Lists) or a value and a Set and determins if the first value or set is contained within the other. .

fnUnionOfSets(...) | source | documentation
This function takes two arrays or delimited string lists and returns an array of unique elements which represent all members contained in both sets. This function used a global variable to return the result owing to VBscripts inability to return more than one value to a function

fnValidateForm(...) | source | documentation
This function
1