Designing Active Server Pages by Scott Mitchell Unconfirmed error reports are from readers. They have not yet been approved or disproved by the author or editor and represent solely the opinion of \ the reader. If you have any error reports or technical questions, you can send them to booktech@oreilly.com. (Please specify the printing date of your copy.) This page was last updated on January 23, 2003. Here's a key to the markup: [page-number]: serious technical mistake {page-number}: minor technical mistake : important language/formatting problem (page-number): language change or minor formatting problem ?page-number?: reader question or request for clarification UNCONFIRMED errors or comments submitted by readers: (33) Paragraph before the last code snippet; Duplicate "to be". {36} Example 2-4 contains the line: my $strMessage = $Request->$Form("txtMessage")->Item(); Certainly the '$' in front of 'Form' is incorrect, since Form is a member function of $Request. Most code I have seen recently also uses 'item' instead of 'Item()', but that's more a matter of taste than syntax. (45) Example 3-1, fourth comment and next line (half-way down the page); Comment and next line should be indented by a couple of spaces. (48) Figure 3-1, third line of first paragraph; Extra space between "on" and "in" ("on in the ASP page,"). (71) Second code snippet, about half-way down the page; Fourth comment line wraps to the next line. Might want to also remove two spaces before the comment mark (') to align it with the next two comment lines. (78) 4th Paragraph; The sentence beginning "Dynamic evaluation allows a code snippet..." is repeated identically by the following sentence. {79} In Table 4-1, the description for the '$' symbol reads: Matches only the end of a string. For example "$d" would match the last "d" in "Todd is mad." It should read: Matches only the end of a string. For example "d$" would match the last "d" in "Todd is mad." {80} In Table 4-1, the description for /B reads: "The opposite of /b. Matches any word boundary." Should read: "The opposite of /b. Matches any non-word boundary." {81} The 7th line in Example 4-1 now reads: objRegExp.Pattern = "[^a-z \-]" Should read: objRegExp.Pattern = "^[a-z\-]" {81} Example 4-1, Using the Test Method to Validate a String: This discrepancy has already been reported by the above reader, but I feel that the interpretation of which of the disperate facts is incorrect is wrong. The code example reads: 'Set the pattern (allow all letters, apostrophes, and hyphens) objRegExp.Pattern = "[^a-z' \-]" I believe that the code is correct, but the comment should read: 'Set the pattern (allow all letters, apostrophes, spaces and hyphens) as this would fit with the continuation of the example on the next page, which seems to imply that names with spaces are OK. {82} Example 4-2, Using the Replace Method: The code example currently reads: 'Set the pattern (allow all letters, apostrophes, and hyphens) objRegExp.Pattern = "\basp\b" However, the comment is in fact that from Example 4-1 on page 81 and does not refer to the example shown. The comment should read something like: 'Set the pattern (match the string "asp" immediately preceeded and followed by a word boundary) {87} line 6 (including comments and blank lines) of the code on the bottom of page; Line reads: objLong.logTextFileLines = "C:\Log\linecount.log" I believe line should read: objLong.TextFilePath = "C:\Log\linecount.log" TextFilePath should be used instead of logTextFileLines because TextFilePath is the property of the object logTextFileLines which was instanciated as objLong. This propery contains the physical path to the log file and what was intended to be set. {103} In the first bullet under "Further Reading," the URL produces a "The page you're looking for has been moved or removed from the site" error. [123] line 16 of ValidateForm code: Raise not found I think this should be "Err.Raise". {132} Just before End Function for AddElement Function; This line will not add a FormElement that's type is "RADIO". A "family" of radio buttons should share a common NAME attribute with different values. The GenerateForm class doesn't seem to take this into account. {179} Property Let Statements; The property let statements are incorrect: The erroneous lines are commented with 'x and the correction line appears below. Even then, the parameter names/usage could be semantically more meaningful; Public Property Let FormElementName(strFormNameValue, strFormName) 'Check to see if the element exists in the dictionary object. 'If it does, update the current value, else add a new value If objFormNameDict.Exists(CStr(iDataType)) then 'Alter the current value 'x objFormNameDict(strFormName) = strFormNameValue objFormNameDict(strFormNameValue) = strFormName Else 'A new element, so add it! 'x objDataTypeDict.Add strFormName, strFormNameValue objDataTypeDict.Add strFormNameValue, strFormName End If End Property Public Property Let FormElementDescription(strFormValue, strFormName) 'Check to see if the element exists in the dictionary object. 'If it does, update the current value, else add a new value If objDataTypeDict.Exists(CStr(iDataType)) then 'Alter the current value 'x objDataTypeDict(CStr(iDataType)) = strFormValue objDataTypeDict(strFormValue) = strFormName Else 'A new element, so add it! 'x objDataTypeDict.Add strFormValue, strFormName End If End Property {270} sidebar; In the sidebar at the top of page 270, he says that the content linker list is usually stored as a .txt file, but that we should use the .asp suffix to protect the information in the file. "Since the Content Linker list file does not contain valid ASP code, an error will be generated, and the user will not see the source code." But this is untrue. There is NO asp code in the file, and so IIS will simply return the contents of the file to be displayed as text, just as it would with the .txt file.