Sams Teach Yourself Dreamweaver UltraDev 4 in 21 Days (Teach Yourself...)

John Ray Teach Yourself Dreamweaver  UltraDev 4   in 21 Days 800 East 96th St., Indianapolis, Indiana, 46240...
Author:  John Ray

42 downloads 449 Views 13MB Size Report

This content was uploaded by our users and we assume good faith they have the permission to share this book. If you own the copyright to this book and it is wrongfully on our website, we offer a simple DMCA procedure to remove your content from our site. Start by pressing the button below!

Report copyright / DMCA form

43 44 45

The key to understanding the connection between this document and the JavaScript is the message field. Named message in the HTML (line 35), this field is accessed directly within the JavaScript behavior definition.

659

B

660

Appendix B

UltraDev inserts a series of default buttons into the right side of the configuration window that are not shown in the dialog box’s HTML. These buttons (typically OK and Cancel) signal the behavior to insert the JavaScript code into the document, or forgo making any changes. The best way to create your own behaviors (as a beginner) is to duplicate and edit existing behaviors. You can truly customize UltraDev into an application that bears no resemblance to its original self.

Note

You might have noticed that there are several folders with the prefix “Server” inside the Configuration directory. These folders contain definitions of all the available application server models—ASP/VBScript, ASP/JavaScript, JSP, and CFML, as well as the user interface definitions for all the behaviors. If you’re feeling truly adventurous, try digging through this folder. With a little work, you can actually modify UltraDev to talk to other embedded scripting languages.

APPENDIX

C

MySQL Quick Function Reference Here you can find a summary of the data types that are currently supported within MySQL as well as many functions you can use within your queries to further advance the capabilities of your application. The descriptions given are a simplified and abbreviated version of those on the MySQL homepage (http://www.mysql.com/). Please refer to the official documentation for more detailed information.

Common Data Types TINYINT [UNSIGNED]—A very small integer. The signed range is –128 to 127. The unsigned range is 0 to 255. SMALLINT [UNSIGNED]—A small integer. The signed range is –32,768 to 32,767. The unsigned range is 0 to 65,535. MEDIUMINT [UNSIGNED]—A medium-size integer. The signed range is –8,388,608 to 8,388,607. The unsigned range is 0 to 16,777,215.

662

Appendix C

INT [UNSIGNED]—A normal-size integer. The signed range is –2,147,483,648 to 2,147,483,647. The unsigned range is 0 to 4,294,967,295. INTEGER [UNSIGNED]—This is a synonym for INT. BIGINT [UNSIGNED]—A large integer. The signed range is –9,223,372,036,854,775,808 to 9,223,372,036,854,775,807. The unsigned range is 0 to 18,446,744,073,709,551,615. FLOAT—A small (single-precision) floating-point number. Cannot be unsigned. Allowable values are –3.402823466E+38 to –1.175494351E-38, 0 and 1.175494351E-38 to 3.402823466E+38 DOUBLE—A normal-size (double-precision) floating-point number. Cannot be unsigned. Allowable values are –1.7976931348623157E+308 to –2.2250738585072014E-308, 0 and 2.2250738585072014E-308 to 1.7976931348623157E+308. DECIMAL—An unpacked floating-point number. Cannot be unsigned. Behaves like a CHAR column: “unpacked” means that the number is stored as a string, using one character for each digit of the value. DATETIME—A date and time combination. The supported range is ‘1000-01-01 00:00:00’ to ‘9999-12-31 23:59:59’. MySQL displays DATETIME values in ‘YYYY-MM-DD HH:MM:SS’ format, but allows you to assign values to DATETIME columns using either strings or numbers. TIMESTAMP—A timestamp. The range is ‘1970-01-01 00:00:00’ to sometime in the year 2037. YEAR—A year in 2- or 4-digit formats (default is 4-digit). The allowable values are 1901 to 2155, and 0000 in the 4 year format and 1970-2069 if you use the 2-digit format (70-69). CHAR(M) [BINARY]—A fixed-length string that is always right-padded with spaces to the specified length when stored. The range of M is 1 to 255 characters. Trailing spaces are removed when the value is retrieved. CHAR values are sorted and compared in not case sensitive fashion according to the default character set unless the BINARY keyword is given. VARCHAR(M) [BINARY]—A variable-length string. Note: Trailing spaces are removed when the value is stored. The range of M is 1 to 255 characters. VARCHAR values are sorted and compared in not case sensitive fashion unless the BINARY keyword is given.

MySQL Quick Function Reference

663

TINYBLOB/TINYTEXT—A BLOB or TEXT column with a maximum length of 255 (2^8–1) characters. BLOB/TEXT—A column with a maximum length of 65,535 (2^16–1) characters. MEDIUMBLOB/MEDIUMTEXT—A BLOB or TEXT column with a maximum length of 16,777,215 (2^24–1) characters. LONGBLOB / LONGTEXT—A BLOB or TEXT column with a maximum length of 4,294,967,295 (2^32–1) characters.

Arithmetic Operations +—Addition

C

-—Subtraction *—Multiplication /—Division

Logical Operations !

or NOT—Logical NOT

OR

or ||—Logical OR

AND

or &&—Logical AND. Returns 0 if either argument is 0 or NULL, otherwise returns 1.

Numeric Comparisons =—Equal <>

or !=—Not equal

<=—Less <—Less

than or equal

than

>=—Greater >—Greater

than or equal

than

IS NULL/IS NOT NULL—Tests

whether a value is or is not NULL.

<expr> BETWEEN <min> AND <max>—Tests

values.

an expression to see if it is between two

664

Appendix C

<expr> IN (,<...>)—Compares

an expression to a list. Returns true if the expression matches any of the values in the list.

<expr> NOT IN (,<...>)—Performs ISNULL(<expr>)—Returns true

the inverse of the previous function.

if the expression is a NULL value.

String Comparison Functions <expr> LIKE <pat>—Pattern

matching using SQL simple regular expression

comparison. <expr> NOT LIKE <pat>—The

opposite of the previous comparison.

<expr> REGEXP <pat> / <expr> RLIKE <pat>—Performs

a pattern match of a string

expression expr against a pattern pat. <expr> NOT REGEXP <pat> / <expr> NOT RLIKE <pat>—The

opposite of the previous

comparison. STRCMP(<expr1>,<expr2>)—Returns 0

if the strings are the same, -1 if the first argument is smaller than the second according to the current sort order, and 1 otherwise. MATCH (,,<...>) AGAINST <expr>—MATCH ... AGAINST() is used for full-text search and returns relevance—similarity measure between the text in the fields and the expression.

Mathematical Functions ABS(X)—Returns

the absolute value of X.

SIGN(X)—Returns the sign of the argument as -1, 0, or 1, depending on whether X is negative, zero, or positive. MOD(N,M)—%

Modulo (like the % operator in C). Returns the remainder of N divided

by M. FLOOR(X)—Returns

the largest integer value not greater than X.

CEILING(X)—Returns ROUND(X)—Returns

the smallest integer value not less than X.

the argument X, rounded to the nearest integer.

ROUND(X,D)—Returns

the argument X, rounded to a number with D decimals. If D is 0, the result will have no decimal point or fractional part.

MySQL Quick Function Reference

EXP(X)—Returns

the value of e (the base of natural logarithms) raised to the power of X.

LOG(X)—Returns

the natural logarithm of X.

LOG10(X)—Returns

the base-10 logarithm of X.

POW(X,Y) / POWER(X,Y)—Returns SQRT(X)—Returns PI()—Returns

665

the value of X raised to the power of Y.

the non-negative square root of X.

the value of PI.

COS(X)—Returns

the cosine of X, where X is given in radians.

SIN(X)—Returns

the sine of X, where X is given in radians.

TAN(X)—Returns

the tangent of X, where X is given in radians.

ACOS(X)—Returns

the arc cosine of X, that is, the value whose cosine is X. Returns NULL if X is not in the range –1 to 1. ASIN(X)—Returns

the arc sine of X, that is, the value whose sine is X. Returns NULL if X is not in the range –1 to 1. ATAN(X)—Returns

the arc tangent of X, that is, the value whose tangent is X.

ATAN2(X,Y)—Returns

the arc tangent of the two variables X and Y. It is similar to calculating the arc tangent of Y / X, except that the signs of both arguments are used to determine the quadrant of the result. COT(X)—Returns

the cotangent of X.

RAND() / RAND(N)—Returns

a random floating-point value in the range 0 to 1.0. If an integer argument N is specified, it is used as the seed value.

LEAST(X,Y,...)—With

two or more arguments, returns the smallest (minimum-valued)

argument. GREATEST(X,Y,...)—Returns RADIANS(X)—Returns

the largest (maximum-valued) argument.

the argument X, converted from degrees to radians.

TRUNCATE(X,D)—Returns the number X, truncated to D decimals. If D is 0, the result will have no decimal point or fractional part.

String Functions ASCII(str)—Returns

the ASCII code value of the leftmost character of the string str. Returns 0 if str is the empty string. Returns NULL if str is NULL.

C

666

Appendix C

CONV(N,from_base,to_base)—Converts numbers between different number bases. Returns a string representation of the number N, converted from base from_base to base to_base. BIN(N)—Returns

a string representation of the binary value of N.

OCT(N)—Returns

a string representation of the octal value of N.

HEX(N)—Returns

a string representation of the hexadecimal value of N.

CHAR(N,...)—CHAR()

interprets the arguments as integers and returns a string consisting of the characters given by the ASCII code values of those integers.

CONCAT(str1,str2,...)—Returns

the string that results from concatenating the argu-

ments. CONCAT_WS(separator, str1, str2,...)—CONCAT_WS() stands for CONCAT With Separator and is a special form of CONCAT(). The first argument is the separator for the rest of the arguments. LENGTH(str)—Returns

the length of the string str.

LOCATE(substr,str) / POSITION(substr IN str)—Returns the position of the first occurrence of substring substr in string str. Returns 0 if substr is not in str. LOCATE(substr,str,pos)—Returns substr

the position of the first occurrence of substring in string str, starting at position pos. Returns 0 if substr is not in str.

INSTR(str,substr)—Returns

the position of the first occurrence of substring substr in string str. This is the same as the two-argument form of LOCATE(), except that the arguments are swapped. LPAD(str,len,padstr)—Returns str

the string str, left-padded with the string padstr until

is len characters long.

RPAD(str,len,padstr)—Returns

the string str, right-padded with the string padstr

until str is len characters long. LEFT(str,len)—Returns

the leftmost len characters from the string str.

RIGHT(str,len)—Returns

the rightmost len characters from the string str.

SUBSTRING(str,pos,len) / MID(str,pos,len)—Returns

a substring len characters

long from string str, starting at position pos. SUBSTRING(str,pos)—Returns LTRIM(str)—Returns

a substring from string str starting at position pos.

the string str with leading space characters removed.

MySQL Quick Function Reference

RTRIM(str)—Returns

667

the string str with trailing space characters removed.

SOUNDEX(str)—Returns

a soundex string from str. Two strings that sound about the same should have identical soundex strings.

SPACE(N)—Returns

a string consisting of N space characters.

REPLACE(str,from_str,to_str)—Returns

the string str with all occurrences of the string from_str replaced by the string to_str. REPEAT(str,count)—Returns

If count

<= 0,

a string consisting of the string str repeated count times. returns an empty string. Returns NULL if str or count are NULL.

REVERSE(str)—Returns

the string str with the order of the characters reversed.

INSERT(str,pos,len,newstr)—Returns the string str, with the substring beginning at position pos and len characters long replaced by the string newstr. LCASE(str) / LOWER(str)—Returns

the string str with all characters changed to low-

ercase. UCASE(str) / UPPER(str)—Returns

the string str with all characters changed to

uppercase.

Date and Time Functions DAYOFWEEK(date)—Returns

the weekday index for date (1 = Sunday, 2 = Monday, ...

7 = Saturday). WEEKDAY(date)—Returns

the weekday index for date (0 = Monday, 1 = Tuesday, ...

6 = Sunday). DAYOFMONTH(date)—Returns DAYOFYEAR(date)—Returns MONTH(date)—Returns

the day of the month for date, in the range 1 to 31.

the day of the year for date, in the range 1 to 366.

the month for date, in the range 1 to 12.

DAYNAME(date)—Returns

the name of the weekday for date.

MONTHNAME(date)—Returns QUARTER(date)—Returns

the name of the month for date.

the quarter of the year for date, in the range 1 to 4.

WEEK(date) / WEEK(date,first)—With

a single argument, returns the week for date,

in the range 0 to 53. YEAR(date)—Returns

the year for date, in the range 1000 to 9999.

C

668

Appendix C

YEARWEEK(date) / YEARWEEK(date,first)—Returns HOUR(time)—Returns

year and week for a date.

the hour for time, in the range 0 to 23.

MINUTE(time)—Returns

the minute for time, in the range 0 to 59.

SECOND(time)—Returns

the second for time, in the range 0 to 59.

TO_DAYS(date)—Given

a date, returns a daynumber (the number of days since year 0).

FROM_DAYS(N)—Given

a daynumber N, returns a DATE value.

CURDATE() / CURRENT_DATE—Returns

today’s date.

CURTIME() / CURRENT_TIME—Returns

the current time.

NOW()—Returns

the current date and time.

SEC_TO_TIME(seconds)—Returns

the seconds argument, converted to hours, minutes,

and seconds. TIME_TO_SEC(time)—Returns

the time argument, converted to seconds.

Summarization Functions for Use with GROUP BY Clauses COUNT(<expr>)—Returns

a count of the number of non-NULL values in the rows retrieved

by a SELECT statement. COUNT(DISTINCT <expr>,[<expr...>])—Returns

a count of the number of different

non-NULL values. AVG(<expr>)—Returns

the average value of expr.

MIN(<expr>)—Returns

the minimum value of expr.

MAX(<expr>)—Returns

the maximum value of expr.

SUM(<expr>)—Returns

the sum of expr. Note that if the return set has no rows, it returns

NULL. STD(<expr>) / STDDEV(<expr>)—Returns

the standard deviation of expr.

APPENDIX

D

Custom Code Listings Several of the projects in the final week of the book text required changes to the pages in order to operate correctly. I’m including the full code for these pages here for easy reference. The HTML is according to my design, of course, but the embedded code can be used as a reference if all else fails.

Day 15—The Guestbook (guestbook.asp) One of the first projects, the guestbook, required editing the code to properly define the query. The source code for the guestbook is shown here: <%@LANGUAGE=”VBSCRIPT”%> <% ‘ *** Insert Record: construct a sql insert statement and execute it MM_editAction = CStr(Request(“URL”)) If (Request.QueryString <> “”) Then MM_editAction = MM_editAction & “?” & Request.QueryString End If If (CStr(Request(“MM_insert”)) <> “”) Then MM_tableName = “tblcomment” MM_fields =

670

Appendix D

“name,name,’,none,’’,email,email,’,none,’’,message,message,’,none,’’” MM_redirectPage = “guestbook.asp” ‘ create the insert sql statement MM_tableValues = “” MM_dbValues = “” MM_fieldsArray = Split(MM_fields, “,”) For i = LBound(MM_fieldsArray) To UBound(MM_fieldsArray) Step 5 FormVal = CStr(Request.Form(MM_fieldsArray(i))) Delim = MM_fieldsArray(i+2) If (Delim = “none”) Then Delim = “” AltVal = MM_fieldsArray(i+3) If (AltVal = “none”) Then AltVal = “” EmptyVal = MM_fieldsArray(i+4) If (EmptyVal = “none”) Then EmptyVal = “” If (FormVal = “”) Then FormVal = EmptyVal Else If (AltVal <> “”) Then FormVal = AltVal ElseIf (Delim = “‘“) Then ‘ escape quotes FormVal = “‘“ & Replace(FormVal,”’”,”’’”) & “‘“ Else FormVal = Delim + FormVal + Delim End If End If If (i <> LBound(MM_fieldsArray)) Then MM_tableValues = MM_tableValues & “,” MM_dbValues = MM_dbValues & “,” End if MM_tableValues = MM_tableValues & MM_fieldsArray(i+1) MM_dbValues = MM_dbValues & FormVal Next MM_insertStr = “insert into “ & MM_tableName & “ (“ & MM_tableValues & “) values (“ & MM_dbValues & “)” ‘ finish the sql and execute it Set MM_insertCmd = Server.CreateObject(“ADODB.Command”) MM_insertCmd.ActiveConnection = “dsn=ud9;” MM_insertCmd.CommandText = MM_insertStr MM_insertCmd.Execute ‘ redirect with URL parameters If (MM_redirectPage = “”) Then MM_redirectPage = CStr(Request(“URL”)) End If If (InStr(1, MM_redirectPage, “?”, vbTextCompare) = 0 And (Request.QueryString <> “”)) Then MM_redirectPage = MM_redirectPage & “?” & Request.QueryString End If

Custom Code Listings

Call Response.Redirect(MM_redirectPage) End If %> <% set rsComment = Server.CreateObject(“ADODB.Recordset”) rsComment.ActiveConnection = MM_connChapter15a_STRING pc=”%” rsComment.Source = “SELECT * FROM tblcomment WHERE message NOT LIKE ‘%SUCK%’ AND message NOT LIKE ‘%<”+pc+”>%’ ORDER BY messageID DESC” rsComment.CursorType = 0 rsComment.CursorLocation = 2 rsComment.LockType = 3 rsComment.Open() rsComment_numRows = 0 %> <% Dim Repeat1__numRows Repeat1__numRows = 10 Dim Repeat1__index Repeat1__index = 0 rsComment_numRows = rsComment_numRows + Repeat1__numRows %> Guestbook <meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1”>

Please sign our guestbook!

”>
Your name:    Email address:
Comments:

671

D

672

Appendix D

 

 

The last 10 people to sign the book said...

<% While ((Repeat1__numRows <> 0) AND (NOT rsComment.EOF)) %>
<%=(rsComment.Fields.Item(“message”).Value)%>
<%=(rsComment.Fields.Item(“name”).Value)%>
<% Repeat1__index=Repeat1__index+1 Repeat1__numRows=Repeat1__numRows-1 rsComment.MoveNext() Wend %>

 



Day 16—Message List (index.asp) The bulletin board message listing must pass values back to itself to use in the SORT BY clause of the query. When creating the page, you added these values by hand. The main message listing page is presented here:

Custom Code Listings

<%@LANGUAGE=”VBSCRIPT”%> <% ‘ *** Restrict Access To Page: Grant or deny access to this page MM_authorizedUsers=”student,teacher” MM_authFailedURL=”index.asp” MM_grantAccess=false If Session(“MM_Username”) <> “” Then If (false Or CStr(Session(“MM_UserAuthorization”))=””) Or _ (InStr(1,MM_authorizedUsers,Session(“MM_UserAuthorization”))>=1) Then MM_grantAccess = true End If End If If Not MM_grantAccess Then MM_qsChar = “?” If (InStr(1,MM_authFailedURL,”?”) >= 1) Then MM_qsChar = “&” MM_referrer = Request.ServerVariables(“URL”) if (Len(Request.QueryString()) > 0) Then MM_referrer = MM_referrer & “?” & Request.QueryString() MM_authFailedURL = MM_authFailedURL & MM_qsChar & “accessdenied=” & Server.URLEncode(MM_referrer) Response.Redirect(MM_authFailedURL) End If %> <% ‘ *** Edit Operations: declare variables MM_editAction = CStr(Request(“URL”)) If (Request.QueryString <> “”) Then MM_editAction = MM_editAction & “?” & Request.QueryString End If

Custom Code Listings

693

‘ boolean to abort record edit MM_abortEdit = false ‘ query string to execute MM_editQuery = “” %> <% ‘ *** Insert Record: set variables If (CStr(Request(“MM_insert”)) <> “”) Then MM_editConnection = MM_connChapter19_STRING MM_editTable = “response” MM_editRedirectUrl = “” MM_fieldsStr = “answerID|value|questionID|value|username|value” MM_columnsStr = “answerID|none,none,NULL|questionID|none,none,NULL|username|’,none,’’” ‘ create the MM_fields and MM_columns arrays MM_fields = Split(MM_fieldsStr, “|”) MM_columns = Split(MM_columnsStr, “|”) ‘ set the form values For i = LBound(MM_fields) To UBound(MM_fields) Step 2 MM_fields(i+1) = CStr(Request.Form(MM_fields(i))) Next ‘ set the redirect URL If (MM_editRedirectUrl = “”) Then MM_editRedirectUrl = CStr(Request(“URL”)) End If If (Request.QueryString <> “”) Then If (InStr(1, MM_editRedirectUrl, “?”, vbTextCompare) = 0 And Request.QueryString <> “”) Then MM_editRedirectUrl = MM_editRedirectUrl & “?” & Request.QueryString Else MM_editRedirectUrl = MM_editRedirectUrl & “&” & Request.QueryString End If End If End If %> <% ‘ *** Insert Record: construct a sql insert statement and execute it If (CStr(Request(“MM_insert”)) <> “”) Then ‘ create the sql insert statement MM_tableValues = “” MM_dbValues = “” For i = LBound(MM_fields) To UBound(MM_fields) Step 2 FormVal = MM_fields(i+1)

D

694

Appendix D

MM_typeArray = Split(MM_columns(i+1),”,”) Delim = MM_typeArray(0) If (Delim = “none”) Then Delim = “” AltVal = MM_typeArray(1) If (AltVal = “none”) Then AltVal = “” EmptyVal = MM_typeArray(2) If (EmptyVal = “none”) Then EmptyVal = “” If (FormVal = “”) Then FormVal = EmptyVal Else If (AltVal <> “”) Then FormVal = AltVal ElseIf (Delim = “‘“) Then ‘ escape quotes FormVal = “‘“ & Replace(FormVal,”’”,”’’”) & “‘“ Else FormVal = Delim + FormVal + Delim End If End If If (i <> LBound(MM_fields)) Then MM_tableValues = MM_tableValues & “,” MM_dbValues = MM_dbValues & “,” End if MM_tableValues = MM_tableValues & MM_columns(i) MM_dbValues = MM_dbValues & FormVal Next MM_editQuery = “insert into “ & MM_editTable & “ (“ & MM_tableValues & “) values (“ & MM_dbValues & “)” If (Not MM_abortEdit) Then ‘ execute the insert Set MM_editCmd = Server.CreateObject(“ADODB.Command”) MM_editCmd.ActiveConnection = MM_editConnection MM_editCmd.CommandText = MM_editQuery MM_editCmd.Execute If (MM_editRedirectUrl <> “”) Then Call Response.Redirect(MM_editRedirectUrl) End If End If End If %> <% set rsQuestion = Server.CreateObject(“ADODB.Recordset”) rsQuestion.ActiveConnection = MM_connChapter19_STRING rsQuestion.Source = “SELECT * FROM question” rsQuestion.CursorType = 0 rsQuestion.CursorLocation = 2 rsQuestion.LockType = 3 rsQuestion.Open() rsQuestion_numRows = 0

Custom Code Listings

%> <% set rsResponse = Server.CreateObject(“ADODB.Recordset”) rsResponse.ActiveConnection = MM_connChapter19_STRING rsResponse.Source = “SELECT * FROM response” rsResponse.CursorType = 0 rsResponse.CursorLocation = 2 rsResponse.LockType = 3 rsResponse.Open() rsResponse_numRows = 0 %> <% Dim rsCorrect__varUsername rsCorrect__varUsername = “jray” if (Session(“MM_Username”) <> “”) then rsCorrect__varUsername = Session(“MM_Username”) %> <% set rsCorrect = Server.CreateObject(“ADODB.Recordset”) rsCorrect.ActiveConnection = MM_connChapter19_STRING rsCorrect.Source = “SELECT * FROM response,question WHERE response.username=’” + Replace(rsCorrect__varUsername, “‘“, “‘’”) + “‘ AND response.answerID=question.answerID AND response.questionID=question.questionID” rsCorrect.CursorType = 0 rsCorrect.CursorLocation = 2 rsCorrect.LockType = 3 rsCorrect.Open() rsCorrect_numRows = 0 %> <% Dim rsResponseAll__MMColParam rsResponseAll__MMColParam = “0” if (Session(“MM_Username”) <> “”) then rsResponseAll__MMColParam = Session(“MM_Username”) %> <% set rsResponseAll = Server.CreateObject(“ADODB.Recordset”) rsResponseAll.ActiveConnection = MM_connChapter19_STRING rsResponseAll.Source = “SELECT * FROM response WHERE username = ‘“ + Replace(rsResponseAll__MMColParam, “‘“, “‘’”) + “‘“ rsResponseAll.CursorType = 0 rsResponseAll.CursorLocation = 2 rsResponseAll.LockType = 3 rsResponseAll.Open() rsResponseAll_numRows = 0 %> <% ‘ *** Recordset Stats, Move To Record, and Go To Record: declare stats variables ‘ set the record count rsQuestion_total = rsQuestion.RecordCount

695

D

696

Appendix D

‘ set the number of rows displayed on this page If (rsQuestion_numRows < 0) Then rsQuestion_numRows = rsQuestion_total Elseif (rsQuestion_numRows = 0) Then rsQuestion_numRows = 1 End If ‘ set the first and last displayed record rsQuestion_first = 1 rsQuestion_last = rsQuestion_first + rsQuestion_numRows - 1 ‘ if we have the correct record count, check the other stats If (rsQuestion_total <> -1) Then If (rsQuestion_first > rsQuestion_total) Then rsQuestion_first = rsQuestion_total If (rsQuestion_last > rsQuestion_total) Then rsQuestion_last = rsQuestion_total If (rsQuestion_numRows > rsQuestion_total) Then rsQuestion_numRows = rsQuestion_total End If %> <% ‘ *** Recordset Stats, Move To Record, and Go To Record: declare stats variables ‘ set the record count rsCorrect_total = rsCorrect.RecordCount ‘ set the number of rows displayed on this page If (rsCorrect_numRows < 0) Then rsCorrect_numRows = rsCorrect_total Elseif (rsCorrect_numRows = 0) Then rsCorrect_numRows = 1 End If ‘ set the first and last displayed record rsCorrect_first = 1 rsCorrect_last = rsCorrect_first + rsCorrect_numRows - 1 ‘ if we have the correct record count, check the other stats If (rsCorrect_total <> -1) Then If (rsCorrect_first > rsCorrect_total) Then rsCorrect_first = rsCorrect_total If (rsCorrect_last > rsCorrect_total) Then rsCorrect_last = rsCorrect_total If (rsCorrect_numRows > rsCorrect_total) Then rsCorrect_numRows = rsCorrect_total End If %> <% ‘ *** Recordset Stats, Move To Record, and Go To Record: declare stats variables ‘ set the record count rsResponseAll_total = rsResponseAll.RecordCount

Custom Code Listings

697

‘ set the number of rows displayed on this page If (rsResponseAll_numRows < 0) Then rsResponseAll_numRows = rsResponseAll_total Elseif (rsResponseAll_numRows = 0) Then rsResponseAll_numRows = 1 End If ‘ set the first and last displayed record rsResponseAll_first = 1 rsResponseAll_last = rsResponseAll_first + rsResponseAll_numRows - 1 ‘ if we have the correct record count, check the other stats If (rsResponseAll_total <> -1) Then If (rsResponseAll_first > rsResponseAll_total) Then rsResponseAll_first = rsResponseAll_total If (rsResponseAll_last > rsResponseAll_total) Then rsResponseAll_last = rsResponseAll_total If (rsResponseAll_numRows > rsResponseAll_total) Then rsResponseAll_numRows = rsResponseAll_total End If %> <% ‘ *** Recordset Stats: if we don’t know the record count, manually count them If (rsQuestion_total = -1) Then ‘ count the total records by iterating through the recordset rsQuestion_total=0 While (Not rsQuestion.EOF) rsQuestion_total = rsQuestion_total + 1 rsQuestion.MoveNext Wend ‘ reset the cursor to the beginning If (rsQuestion.CursorType > 0) Then rsQuestion.MoveFirst Else rsQuestion.Requery End If ‘ set the number of rows displayed on this page If (rsQuestion_numRows < 0 Or rsQuestion_numRows > rsQuestion_total) Then rsQuestion_numRows = rsQuestion_total End If ‘ set the first and last displayed record rsQuestion_first = 1 rsQuestion_last = rsQuestion_first + rsQuestion_numRows - 1 If (rsQuestion_first > rsQuestion_total) Then rsQuestion_first = rsQuestion_total

D

698

Appendix D

If (rsQuestion_last > rsQuestion_total) Then rsQuestion_last = rsQuestion_total End If %> <% ‘ *** Recordset Stats: if we don’t know the record count, manually count them If (rsCorrect_total = -1) Then ‘ count the total records by iterating through the recordset rsCorrect_total=0 While (Not rsCorrect.EOF) rsCorrect_total = rsCorrect_total + 1 rsCorrect.MoveNext Wend ‘ reset the cursor to the beginning If (rsCorrect.CursorType > 0) Then rsCorrect.MoveFirst Else rsCorrect.Requery End If ‘ set the number of rows displayed on this page If (rsCorrect_numRows < 0 Or rsCorrect_numRows > rsCorrect_total) Then rsCorrect_numRows = rsCorrect_total End If ‘ set the first and last displayed record rsCorrect_first = 1 rsCorrect_last = rsCorrect_first + rsCorrect_numRows - 1 If (rsCorrect_first > rsCorrect_total) Then rsCorrect_first = rsCorrect_total If (rsCorrect_last > rsCorrect_total) Then rsCorrect_last = rsCorrect_total End If %> <% ‘ *** Recordset Stats: if we don’t know the record count, manually count them If (rsResponseAll_total = -1) Then ‘ count the total records by iterating through the recordset rsResponseAll_total=0 While (Not rsResponseAll.EOF) rsResponseAll_total = rsResponseAll_total + 1 rsResponseAll.MoveNext Wend ‘ reset the cursor to the beginning If (rsResponseAll.CursorType > 0) Then rsResponseAll.MoveFirst Else

Custom Code Listings

699

rsResponseAll.Requery End If ‘ set the number of rows displayed on this page If (rsResponseAll_numRows < 0 Or rsResponseAll_numRows > rsResponseAll_total) Then rsResponseAll_numRows = rsResponseAll_total End If ‘ set the first and last displayed record rsResponseAll_first = 1 rsResponseAll_last = rsResponseAll_first + rsResponseAll_numRows - 1 If (rsResponseAll_first > rsResponseAll_total) Then rsResponseAll_first = rsResponseAll_total If (rsResponseAll_last > rsResponseAll_total) Then rsResponseAll_last = rsResponseAll_total End If %> <% ‘ *** Move To Record and Go To Record: declare variables Set MM_rs = rsQuestion MM_rsCount = rsQuestion_total MM_size = rsQuestion_numRows MM_uniqueCol = “” MM_paramName = “” MM_offset = 0 MM_atTotal = false MM_paramIsDefined = false If (MM_paramName <> “”) Then MM_paramIsDefined = (Request.QueryString(MM_paramName) <> “”) End If %> <% ‘ *** Move To Record: handle ‘index’ or ‘offset’ parameter if (Not MM_paramIsDefined And MM_rsCount <> 0) then ‘ use index parameter if defined, otherwise use offset parameter r = Request.QueryString(“index”) If r = “” Then r = Request.QueryString(“offset”) If r <> “” Then MM_offset = Int(r) ‘ if we have a record count, check if we are past the end of the recordset If (MM_rsCount <> -1) Then If (MM_offset >= MM_rsCount Or MM_offset = -1) Then ‘ past end or move last If ((MM_rsCount Mod MM_size) > 0) Then ‘ last page not a full repeat region MM_offset = MM_rsCount - (MM_rsCount Mod MM_size) Else MM_offset = MM_rsCount - MM_size End If

D

700

Appendix D

End If End If ‘ move the cursor to the selected record i = 0 While ((Not MM_rs.EOF) And (i < MM_offset Or MM_offset = -1)) MM_rs.MoveNext i = i + 1 Wend If (MM_rs.EOF) Then MM_offset = i ‘ set MM_offset to the last possible record End If %> <% ‘ *** Move To Record: if we dont know the record count, check the display range If (MM_rsCount = -1) Then ‘ walk to the end of the display range for this page i = MM_offset While (Not MM_rs.EOF And (MM_size < 0 Or i < MM_offset + MM_size)) MM_rs.MoveNext i = i + 1 Wend ‘ if we walked off the end of the recordset, set MM_rsCount and MM_size If (MM_rs.EOF) Then MM_rsCount = i If (MM_size < 0 Or MM_size > MM_rsCount) Then MM_size = MM_rsCount End If ‘ if we walked off the end, set the offset based on page size If (MM_rs.EOF And Not MM_paramIsDefined) Then If (MM_offset > MM_rsCount - MM_size Or MM_offset = -1) Then If ((MM_rsCount Mod MM_size) > 0) Then MM_offset = MM_rsCount - (MM_rsCount Mod MM_size) Else MM_offset = MM_rsCount - MM_size End If End If End If ‘ reset the cursor to the beginning If (MM_rs.CursorType > 0) Then MM_rs.MoveFirst Else MM_rs.Requery End If ‘ move the cursor to the selected record i = 0 While (Not MM_rs.EOF And i < MM_offset) MM_rs.MoveNext

Custom Code Listings

701

i = i + 1 Wend End If %> <% set rsAnswer = Server.CreateObject(“ADODB.Recordset”) rsAnswer.ActiveConnection = MM_connChapter19_STRING rsAnswer.Source = “SELECT * FROM answer WHERE questionID=’” & rsQuestion.Fields.Item(“questionID”).Value & “‘“ rsAnswer.CursorType = 0 rsAnswer.CursorLocation = 2 rsAnswer.LockType = 3 rsAnswer.Open() rsAnswer_numRows = 0 %> <% ‘ *** Move To Record: update recordset stats ‘ set the first and last displayed record rsQuestion_first = MM_offset + 1 rsQuestion_last = MM_offset + MM_size If (MM_rsCount <> -1) Then If (rsQuestion_first > MM_rsCount) Then rsQuestion_first = MM_rsCount If (rsQuestion_last > MM_rsCount) Then rsQuestion_last = MM_rsCount End If ‘ set the boolean used by hide region to check if we are on the last record MM_atTotal = (MM_rsCount <> -1 And MM_offset + MM_size >= MM_rsCount) %> <% ‘ *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters ‘ create the list of parameters which should not be maintained MM_removeList = “&index=” If (MM_paramName <> “”) Then MM_removeList = MM_removeList & “&” & MM_paramName & “=” MM_keepURL=””:MM_keepForm=””:MM_keepBoth=””:MM_keepNone=”” ‘ add the URL parameters to the MM_keepURL string For Each Item In Request.QueryString NextItem = “&” & Item & “=” If (InStr(1,MM_removeList,NextItem,1) = 0) Then MM_keepURL = MM_keepURL & NextItem & Server.URLencode(Request.QueryString(Item)) End If Next ‘ add the Form variables to the MM_keepForm string For Each Item In Request.Form NextItem = “&” & Item & “=” If (InStr(1,MM_removeList,NextItem,1) = 0) Then

D

702

Appendix D

MM_keepForm = MM_keepForm & NextItem & Server.URLencode(Request.Form(Item)) End If Next ‘ create the Form + URL string and remove strings MM_keepBoth = MM_keepURL & MM_keepForm if (MM_keepBoth <> “”) Then MM_keepBoth = 1) if (MM_keepURL <> “”) Then MM_keepURL = if (MM_keepForm <> “”) Then MM_keepForm = 1)

the intial ‘&’ from each of the

Right(MM_keepBoth, Len(MM_keepBoth) Right(MM_keepURL, Len(MM_keepURL) - 1) Right(MM_keepForm, Len(MM_keepForm) -

‘ a utility function used for adding additional parameters to these strings Function MM_joinChar(firstItem) If (firstItem <> “”) Then MM_joinChar = “&” Else MM_joinChar = “” End If End Function %> <% ‘ *** Move To Record: set the strings for the first, last, next, and previous links MM_keepMove = MM_keepBoth MM_moveParam = “index” ‘ if the page has a repeated region, remove ‘offset’ from the maintained parameters If (MM_size > 0) Then MM_moveParam = “offset” If (MM_keepMove <> “”) Then params = Split(MM_keepMove, “&”) MM_keepMove = “” For i = 0 To UBound(params) nextItem = Left(params(i), InStr(params(i),”=”) - 1) If (StrComp(nextItem,MM_moveParam,1) <> 0) Then MM_keepMove = MM_keepMove & “&” & params(i) End If Next If (MM_keepMove <> “”) Then MM_keepMove = Right(MM_keepMove, Len(MM_keepMove) - 1) End If End If End If ‘ set the strings for the move to links If (MM_keepMove <> “”) Then MM_keepMove = MM_keepMove & “&” urlStr = Request.ServerVariables(“URL”) & “?” & MM_keepMove & MM_moveParam & “=” MM_moveFirst = urlStr & “0”

Custom Code Listings

MM_moveLast = urlStr & “-1” MM_moveNext = urlStr & Cstr(MM_offset + MM_size) prev = MM_offset - MM_size If (prev < 0) Then prev = 0 MM_movePrev = urlStr & Cstr(prev) %> Quiz Document <meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1”>
”> <% If rsResponseAll_total <> rsQuestion_total Then %>

703

D

704

Appendix D

Admin

Quiz Question

(You’ve Answered <%=(rsResponseAll_total)%>/<%=(rsQuestion_total)%>)
Topic: <%=(rsQuestion.Fields.Item(“questionTitle”).Value)%>

The Question: <%=(rsQuestion.Fields.Item(“questionText”).Value)%>
Your Answer: <select name=”answerID”> <% While (NOT rsAnswer.EOF) %> <% rsAnswer.MoveNext() Wend %>
”>SKIP QUESTION ”> ”>
<% End If %> <% If rsResponseAll_total = rsQuestion_total Then %> Congratulations! You’ve finished the quiz! <% End If %>
<%=(rsCorrect_total)%> <% rsQuestion.Close() %> <% rsResponse.Close() %> <% rsAnswer.Close() %> <% rsCorrect.Close() %> <% rsResponseAll.Close() %>

Day 20—Add To Cart (details.asp) Adding items to the shopping cart in Day 20 posed a bit of a problem. Because the user’s ID was stored in a session variable, it could not be added using the standard insert behavior. A quick and dirty way around this is by inserting the code to access the session variable directly in to the HTML. The user browsing the item must also be logged in to add an item. This means more Hide Region behavior modification. The source code of the details.asp page of the e-commerce catalog system: <%@LANGUAGE=”VBSCRIPT”%> <% ‘ *** Edit Operations: declare variables MM_editAction = CStr(Request(“URL”)) If (Request.QueryString <> “”) Then

Custom Code Listings

705

MM_editAction = MM_editAction & “?” & Request.QueryString End If ‘ boolean to abort record edit MM_abortEdit = false ‘ query string to execute MM_editQuery = “” %> <% ‘ *** Insert Record: set variables If (CStr(Request(“MM_insert”)) <> “”) Then MM_editConnection = MM_connCatalog_STRING MM_editTable = “tblCart” MM_editRedirectUrl = “checkout.asp” MM_fieldsStr = “prodID|value” MM_columnsStr = “prodID|’,none,’’” ‘ create the MM_fields and MM_columns arrays MM_fields = Split(MM_fieldsStr, “|”) MM_columns = Split(MM_columnsStr, “|”) ‘ set the form values For i = LBound(MM_fields) To UBound(MM_fields) Step 2 MM_fields(i+1) = CStr(Request.Form(MM_fields(i))) Next ‘ set the redirect URL If (MM_editRedirectUrl = “”) Then MM_editRedirectUrl = CStr(Request(“URL”)) End If If (Request.QueryString <> “”) Then If (InStr(1, MM_editRedirectUrl, “?”, vbTextCompare) = 0 And Request.QueryString <> “”) Then MM_editRedirectUrl = MM_editRedirectUrl & “?” & Request.QueryString Else MM_editRedirectUrl = MM_editRedirectUrl & “&” & Request.QueryString End If End If End If %> <% ‘ *** Insert Record: construct a sql insert statement and execute it If (CStr(Request(“MM_insert”)) <> “”) Then ‘ create the sql insert statement MM_tableValues = “” MM_dbValues = “” For i = LBound(MM_fields) To UBound(MM_fields) Step 2 FormVal = MM_fields(i+1)

D

706

Appendix D

MM_typeArray = Split(MM_columns(i+1),”,”) Delim = MM_typeArray(0) If (Delim = “none”) Then Delim = “” AltVal = MM_typeArray(1) If (AltVal = “none”) Then AltVal = “” EmptyVal = MM_typeArray(2) If (EmptyVal = “none”) Then EmptyVal = “” If (FormVal = “”) Then FormVal = EmptyVal Else If (AltVal <> “”) Then FormVal = AltVal ElseIf (Delim = “‘“) Then ‘ escape quotes FormVal = “‘“ & Replace(FormVal,”’”,”’’”) & “‘“ Else FormVal = Delim + FormVal + Delim End If End If If (i <> LBound(MM_fields)) Then MM_tableValues = MM_tableValues & “,” MM_dbValues = MM_dbValues & “,” End if MM_tableValues = MM_tableValues & MM_columns(i) MM_dbValues = MM_dbValues & FormVal Next strUsername = Session(“MM_Username”) MM_editQuery = “insert into “ & MM_editTable & “ values (‘’,” & MM_dbValues & “,’” & strUsername & “‘,’’)” If (Not MM_abortEdit) Then ‘ execute the insert Set MM_editCmd = Server.CreateObject(“ADODB.Command”) MM_editCmd.ActiveConnection = MM_editConnection MM_editCmd.CommandText = MM_editQuery MM_editCmd.Execute If (MM_editRedirectUrl <> “”) Then Call Response.Redirect(MM_editRedirectUrl) End If End If End If %> <% Dim searchresults__formCat searchresults__formCat = “%” if (Request(“category”) <> “”) then searchresults__formCat = Request(“category”) %> <% Dim searchresults__formPrice

Custom Code Listings

searchresults__formPrice = “9999” if (Request(“pricelimit”) <> “”) then searchresults__formPrice = Request(“pricelimit”) %> <% Dim searchresults__formKey searchresults__formKey = “%” if (Request(“keyword”) <> “”) then searchresults__formKey = Request(“keyword”) %> <% Dim RelatedItems__relatedID RelatedItems__relatedID = “M004” if (Request(“id”) <> “”) then RelatedItems__relatedID = Request(“id”) %> <% set searchresults = Server.CreateObject(“ADODB.Recordset”) searchresults.ActiveConnection = MM_connCatalog_STRING searchresults.Source = “SELECT * FROM tblProduct WHERE catID LIKE ‘“ + Replace(searchresults__formCat, “‘“, “‘’”) + “‘ AND prodPrice<’” + Replace(searchresults__formPrice, “‘“, “‘’”) + “‘ AND prodDesc LIKE ‘%” + Replace(searchresults__formKey, “‘“, “‘’”) + “%’ ORDER BY catID” searchresults.CursorType = 0 searchresults.CursorLocation = 2 searchresults.LockType = 3 searchresults.Open() searchresults_numRows = 0 %> <% set RelatedItems = Server.CreateObject(“ADODB.Recordset”) RelatedItems.ActiveConnection = MM_connCatalog_STRING RelatedItems.Source = “SELECT tblProduct.* FROM tblProduct,tblRelated WHERE tblProduct.prodID=tblRelated.prodID2 and tblRelated.prodID1=’” + Replace(RelatedItems__relatedID, “‘“, “‘’”) + “‘;” RelatedItems.CursorType = 0 RelatedItems.CursorLocation = 2 RelatedItems.LockType = 3 RelatedItems.Open() RelatedItems_numRows = 0 %> <% set rsCart = Server.CreateObject(“ADODB.Recordset”) rsCart.ActiveConnection = MM_connCatalog_STRING rsCart.Source = “SELECT * FROM tblCart” rsCart.CursorType = 0 rsCart.CursorLocation = 2 rsCart.LockType = 3 rsCart.Open() rsCart_numRows = 0 %> <% Dim Repeat1__numRows Repeat1__numRows = -1 Dim Repeat1__index Repeat1__index = 0

707

D

708

Appendix D

RelatedItems_numRows = RelatedItems_numRows + Repeat1__numRows %> <% ‘ *** Recordset Stats, Move To Record, and Go To Record: declare stats variables ‘ set the record count searchresults_total = searchresults.RecordCount ‘ set the number of rows displayed on this page If (searchresults_numRows < 0) Then searchresults_numRows = searchresults_total Elseif (searchresults_numRows = 0) Then searchresults_numRows = 1 End If ‘ set the first and last displayed record searchresults_first = 1 searchresults_last = searchresults_first + searchresults_numRows - 1 ‘ if we have the correct record count, check the other stats If (searchresults_total <> -1) Then If (searchresults_first > searchresults_total) Then searchresults_first = searchresults_total If (searchresults_last > searchresults_total) Then searchresults_last = searchresults_total If (searchresults_numRows > searchresults_total) Then searchresults_numRows = searchresults_total End If %> <% ‘ *** Move To Record and Go To Record: declare variables Set MM_rs = searchresults MM_rsCount = searchresults_total MM_size = searchresults_numRows MM_uniqueCol = “prodID” MM_paramName = “id” MM_offset = 0 MM_atTotal = false MM_paramIsDefined = false If (MM_paramName <> “”) Then MM_paramIsDefined = (Request.QueryString(MM_paramName) <> “”) End If %> <% ‘ *** Move To Record: handle ‘index’ or ‘offset’ parameter if (Not MM_paramIsDefined And MM_rsCount <> 0) then ‘ use index parameter if defined, otherwise use offset parameter r = Request.QueryString(“index”) If r = “” Then r = Request.QueryString(“offset”) If r <> “” Then MM_offset = Int(r)

Custom Code Listings

709

‘ if we have a record count, check if we are past the end of the recordset If (MM_rsCount <> -1) Then If (MM_offset >= MM_rsCount Or MM_offset = -1) Then ‘ past end or move last If ((MM_rsCount Mod MM_size) > 0) Then ‘ last page not a full repeat region MM_offset = MM_rsCount - (MM_rsCount Mod MM_size) Else MM_offset = MM_rsCount - MM_size End If End If End If ‘ move the cursor to the selected record i = 0 While ((Not MM_rs.EOF) And (i < MM_offset Or MM_offset = -1)) MM_rs.MoveNext i = i + 1 Wend If (MM_rs.EOF) Then MM_offset = i ‘ set MM_offset to the last possible record End If %> <% ‘ *** Move To Specific Record: handle detail parameter If (MM_paramIsDefined And MM_rsCount <> 0) Then ‘ get the value of the parameter param = Request.QueryString(MM_paramName) ‘ find the record with the unique column value equal to the parameter value MM_offset = 0 Do While (Not MM_rs.EOF) If (Cstr(MM_rs.Fields.Item(MM_uniqueCol).Value) = param) Then Exit Do End If MM_offset = MM_offset + 1 MM_rs.MoveNext Loop ‘ if not found, set the number of records and reset the cursor If (MM_rs.EOF) Then If (MM_rsCount < 0) Then MM_rsCount = MM_offset If (MM_size < 0 Or MM_size > MM_offset) Then MM_size = MM_offset MM_offset = 0 ‘ reset the cursor to the beginning If (MM_rs.CursorType > 0) Then MM_rs.MoveFirst Else MM_rs.Close

D

710

Appendix D

MM_rs.Open End If End If End If %> <% ‘ *** Move To Record: if we dont know the record count, check the display range If (MM_rsCount = -1) Then ‘ walk to the end of the display range for this page i = MM_offset While (Not MM_rs.EOF And (MM_size < 0 Or i < MM_offset + MM_size)) MM_rs.MoveNext i = i + 1 Wend ‘ if we walked off the end of the recordset, set MM_rsCount and MM_size If (MM_rs.EOF) Then MM_rsCount = i If (MM_size < 0 Or MM_size > MM_rsCount) Then MM_size = MM_rsCount End If ‘ if we walked off the end, set the offset based on page size If (MM_rs.EOF And Not MM_paramIsDefined) Then If (MM_offset > MM_rsCount - MM_size Or MM_offset = -1) Then If ((MM_rsCount Mod MM_size) > 0) Then MM_offset = MM_rsCount - (MM_rsCount Mod MM_size) Else MM_offset = MM_rsCount - MM_size End If End If End If ‘ reset the cursor to the beginning If (MM_rs.CursorType > 0) Then MM_rs.MoveFirst Else MM_rs.Requery End If ‘ move the cursor to the selected record i = 0 While (Not MM_rs.EOF And i < MM_offset) MM_rs.MoveNext i = i + 1 Wend End If %> <% ‘ *** Move To Record: update recordset stats

Custom Code Listings

711

‘ set the first and last displayed record searchresults_first = MM_offset + 1 searchresults_last = MM_offset + MM_size If (MM_rsCount <> -1) Then If (searchresults_first > MM_rsCount) Then searchresults_first = MM_rsCount If (searchresults_last > MM_rsCount) Then searchresults_last = MM_rsCount End If ‘ set the boolean used by hide region to check if we are on the last record MM_atTotal = (MM_rsCount <> -1 And MM_offset + MM_size >= MM_rsCount) %> <% ‘ *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters ‘ create the list of parameters which should not be maintained MM_removeList = “&index=” If (MM_paramName <> “”) Then MM_removeList = MM_removeList & “&” & MM_paramName & “=” MM_keepURL=””:MM_keepForm=””:MM_keepBoth=””:MM_keepNone=”” ‘ add the URL parameters to the MM_keepURL string For Each Item In Request.QueryString NextItem = “&” & Item & “=” If (InStr(1,MM_removeList,NextItem,1) = 0) Then MM_keepURL = MM_keepURL & NextItem & Server.URLencode(Request.QueryString(Item)) End If Next ‘ add the Form variables to the MM_keepForm string For Each Item In Request.Form NextItem = “&” & Item & “=” If (InStr(1,MM_removeList,NextItem,1) = 0) Then MM_keepForm = MM_keepForm & NextItem & Server.URLencode(Request.Form(Item)) End If Next ‘ create the Form + URL string and remove strings MM_keepBoth = MM_keepURL & MM_keepForm if (MM_keepBoth <> “”) Then MM_keepBoth = 1) if (MM_keepURL <> “”) Then MM_keepURL = if (MM_keepForm <> “”) Then MM_keepForm = 1)

the intial ‘&’ from each of the

Right(MM_keepBoth, Len(MM_keepBoth) Right(MM_keepURL, Len(MM_keepURL) - 1) Right(MM_keepForm, Len(MM_keepForm) -

‘ a utility function used for adding additional parameters to these strings Function MM_joinChar(firstItem) If (firstItem <> “”) Then MM_joinChar = “&”

D

712

Appendix D

Else MM_joinChar = “” End If End Function %> <% ‘ *** Move To Record: set the strings for the first, last, next, and previous links MM_keepMove = MM_keepBoth MM_moveParam = “index” ‘ if the page has a repeated region, remove ‘offset’ from the maintained parameters If (MM_size > 0) Then MM_moveParam = “offset” If (MM_keepMove <> “”) Then params = Split(MM_keepMove, “&”) MM_keepMove = “” For i = 0 To UBound(params) nextItem = Left(params(i), InStr(params(i),”=”) - 1) If (StrComp(nextItem,MM_moveParam,1) <> 0) Then MM_keepMove = MM_keepMove & “&” & params(i) End If Next If (MM_keepMove <> “”) Then MM_keepMove = Right(MM_keepMove, Len(MM_keepMove) - 1) End If End If End If ‘ set the strings for the move to links If (MM_keepMove <> “”) Then MM_keepMove = MM_keepMove & “&” urlStr = Request.ServerVariables(“URL”) & “?” & MM_keepMove & MM_moveParam & “=” MM_moveFirst = urlStr & “0” MM_moveLast = urlStr & “-1” MM_moveNext = urlStr & Cstr(MM_offset + MM_size) prev = MM_offset - MM_size If (prev < 0) Then prev = 0 MM_movePrev = urlStr & Cstr(prev) %> Catalog <meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1”>
 
Custom Code Listings

size=”6” color=”#FFFFFF”>Product Catalog

Go Back

 

 

 

 

 

 

 

 

 

 

 

 

 

” width=”250” height=”250”> <%=(searchresults.Fields.Item(“prodName”).Value)%>
Item #:<%=(searchresults.Fields.Item(“prodID”).Value)%>
Price :<%= FormatCurrency((searchresults.Fields.Item(“prodPrice”).Value), 2, -2, -2, -2) %>



<% If Session(“MM_Username”)<>”” Then %>
”> ”>
<% End If %>

713

D

714

Appendix D

<% If Session(“MM_Username”)=”” Then %> Log into the system <% End If %>
<%=(searchresults.Fields.Item(“prodDesc”).Value)%>

Related Items:
<% While ((Repeat1__numRows <> 0) AND (NOT RelatedItems.EOF)) %><%=(RelatedItems.Fields.Item(“prodName”).Value)%>
<% Repeat1__index=Repeat1__index+1 Repeat1__numRows=Repeat1__numRows-1 RelatedItems.MoveNext() Wend %>

”>Previous
<% RelatedItems.Close() %> <% rsCart.Close() %> <% searchresults.Close() %>

Custom Code Listings

715

Day 20—Deleting Items from the Cart (checkout.asp) Deleting items from the shopping cart posed a challenge because the auto-generated UltraDev behavior has it’s own agenda and will not work the way we want. The changes to this page (checkout.asp) involve removing UltraDev-generated code and eliminating the need for a server redirect. <%@LANGUAGE=”VBSCRIPT”%> <% ‘ *** Edit Operations: declare variables MM_editAction = CStr(Request(“URL”)) If (Request.QueryString <> “”) Then MM_editAction = MM_editAction & “?” & Request.QueryString End If ‘ boolean to abort record edit MM_abortEdit = false ‘ query string to execute MM_editQuery = “” %> <% ‘ *** Delete Record: declare variables if (CStr(Request(“MM_delete”)) <> “”) Then MM_editConnection = MM_connCatalog_STRING MM_editTable = “tblCart” MM_editColumn = “cartID” MM_recordId = “” + Request.Form(“MM_recordId”) + “” MM_editRedirectUrl = “” ‘ set the redirect URL ‘ set the redirect URL If (MM_editRedirectUrl = “”) Then MM_editRedirectUrl = CStr(Request(“URL”)) End If If (Request.QueryString <> “”) Then If (InStr(1, MM_editRedirectUrl, “?”, vbTextCompare) = 0 And Request.QueryString <> “”) Then MM_editRedirectUrl = MM_editRedirectUrl & “?” & Request.QueryString Else MM_editRedirectUrl = MM_editRedirectUrl & “&” & Request.QueryString End If End If

D

716

Appendix D

End If %> <% ‘ *** Delete Record: construct a sql delete statement and execute it If (CStr(Request(“MM_delete”)) <> “”) Then ‘ create the sql delete statement MM_editQuery = “delete from tblCart where cartID=’” & Request(“DeleteID”) & “‘“ If (Not MM_abortEdit) Then ‘ execute the delete Set MM_editCmd = Server.CreateObject(“ADODB.Command”) MM_editCmd.ActiveConnection = MM_editConnection MM_editCmd.CommandText = MM_editQuery MM_editCmd.Execute If (MM_editRedirectUrl <> “”) Then Call Response.Redirect(MM_editRedirectUrl) End If End If



End If %> <% Dim rsCart__varUsername rsCart__varUsername = “testuser” if (Session(“MM_Username”) <> “”) then rsCart__varUsername = Session(“MM_Username”) %> <% Dim rsCartTotal__varUsername rsCartTotal__varUsername = “testuser” if (Session(“MM_Username”) <> “”) then rsCartTotal__varUsername = Session(“MM_Username”) %> <% set rsCart = Server.CreateObject(“ADODB.Recordset”) rsCart.ActiveConnection = MM_connCatalog_STRING rsCart.Source = “SELECT tblCart.cartID,tblCart.prodID,tblProduct.prodName,tblProduct.ProdPrice FROM tblCart,tblProduct WHERE tblCart.username=’” + Replace(rsCart__varUsername, “‘“, “‘’”) + “‘ AND tblCart.prodID=tblProduct.prodID AND tblCart.orderID=’’” rsCart.CursorType = 0 rsCart.CursorLocation = 2 rsCart.LockType = 3 rsCart.Open() rsCart_numRows = 0 %> <% set rsCartTotal = Server.CreateObject(“ADODB.Recordset”) rsCartTotal.ActiveConnection = MM_connCatalog_STRING rsCartTotal.Source = “SELECT sum(tblProduct.ProdPrice) FROM tblCart,tblProduct

Custom Code Listings

WHERE tblCart.username=’” + Replace(rsCartTotal__varUsername, “‘“, “‘’”) + “‘ AND tblCart.prodID=tblProduct.prodID AND tblCart.orderID=’’” rsCartTotal.CursorType = 0 rsCartTotal.CursorLocation = 2 rsCartTotal.LockType = 3 rsCartTotal.Open() rsCartTotal_numRows = 0 %> <% Dim Repeat1__numRows Repeat1__numRows = -1 Dim Repeat1__index Repeat1__index = 0 rsCart_numRows = rsCart_numRows + Repeat1__numRows %> Catalog <meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1”>
  Shopping Cart

Product Categories:

 

 

 

 

 

 

 

 

 

 

 

 

 



717

D

718

Appendix D

”> <% While ((Repeat1__numRows <> 0) AND (NOT rsCart.EOF)) %> <% Repeat1__index=Repeat1__index+1 Repeat1__numRows=Repeat1__numRows-1 rsCart.MoveNext() Wend %>

Custom Code Listings

Product ID Name Price Selected
<%=(rsCart.Fields.Item(“prodID”).Value)%> <%=(rsCart.Fields.Item(“prodName”).Value)%> <%= FormatCurrency((rsCart.Fields.Item(“ProdPrice”).Value), -1, -2, -2, -2) %> ”>
  Total: <%= FormatCurrency((rsCartTotal.Fields.Item(“sum(tblProduct.ProdPrice)”).Value), -1, -2, -2, -2) %>  
     
<% rsCart.Close() %> <% rsCartTotal.Close() %>

Day 20—Final Checkout (checkout2.asp) The final checkout process for the e-commerce site rewrites the temporary shopping cart so that it is considered finished. This is a completely unique behavior to this application and is not directly based on an existing UltraDev behavior. <%@LANGUAGE=”VBSCRIPT”%> <% ‘ *** Edit Operations: declare variables MM_editAction = CStr(Request(“URL”)) If (Request.QueryString <> “”) Then MM_editAction = MM_editAction & “?” & Request.QueryString End If ‘ boolean to abort record edit MM_abortEdit = false ‘ query string to execute MM_editQuery = “” %> <% ‘ *** Insert Record: set variables

719

D

720

Appendix D

If (CStr(Request(“MM_insert”)) <> “”) Then MM_editConnection = MM_connCatalog_STRING MM_editTable = “tblOrderInfo” MM_editRedirectUrl = “finished.asp” MM_fieldsStr = “shipaddress1|value|shipaddress2|value|shipcity|value|shipstate|value|shipzip| ➥value|billaddress1|value|billaddress2|value|billcity|value|billstate| ➥value|billzip|value|paymethod|value|payaccount|value|payexpire|value” MM_columnsStr = “shipaddress1|’,none,’’|shipaddress2|’,none,’’|shipcity|’,none,’’|shipstate| ➥’,none,’’|shipzip|’,none,’’|billaddress1|’,none,’’|billaddress2| ➥’,none,’’|billcity|’,none,’’|billstate|’,none,’’|billzip|’,none,’’| ➥paymethod|’,none,’’|payaccount|’,none,’’|payexpire|’,none,’’” ‘ create the MM_fields and MM_columns arrays MM_fields = Split(MM_fieldsStr, “|”) MM_columns = Split(MM_columnsStr, “|”) ‘ set the form values For i = LBound(MM_fields) To UBound(MM_fields) Step 2 MM_fields(i+1) = CStr(Request.Form(MM_fields(i))) Next ‘ set the redirect URL If (MM_editRedirectUrl = “”) Then MM_editRedirectUrl = CStr(Request(“URL”)) End If If (Request.QueryString <> “”) Then If (InStr(1, MM_editRedirectUrl, “?”, vbTextCompare) = 0 And Request.QueryString <> “”) Then MM_editRedirectUrl = MM_editRedirectUrl & “?” & Request.QueryString Else MM_editRedirectUrl = MM_editRedirectUrl & “&” & Request.QueryString End If End If End If %> <% ‘ *** Insert Record: construct a sql insert statement and execute it If (CStr(Request(“MM_insert”)) <> “”) Then ‘ create the sql insert statement MM_tableValues = “” MM_dbValues = “” For i = LBound(MM_fields) To UBound(MM_fields) Step 2 FormVal = MM_fields(i+1) MM_typeArray = Split(MM_columns(i+1),”,”) Delim = MM_typeArray(0) If (Delim = “none”) Then Delim = “”

Custom Code Listings

AltVal = MM_typeArray(1) If (AltVal = “none”) Then AltVal = “” EmptyVal = MM_typeArray(2) If (EmptyVal = “none”) Then EmptyVal = “” If (FormVal = “”) Then FormVal = EmptyVal Else If (AltVal <> “”) Then FormVal = AltVal ElseIf (Delim = “‘“) Then ‘ escape quotes FormVal = “‘“ & Replace(FormVal,”’”,”’’”) & “‘“ Else FormVal = Delim + FormVal + Delim End If End If If (i <> LBound(MM_fields)) Then MM_tableValues = MM_tableValues & “,” MM_dbValues = MM_dbValues & “,” End if MM_tableValues = MM_tableValues & MM_columns(i) MM_dbValues = MM_dbValues & FormVal Next orderStr=Date()&”-”&Session(“MM_Username”)&”-”&Time() MM_editQuery = “insert into “ & MM_editTable & “ (orderID,” & MM_tableValues & “) values (‘“ & orderStr & “‘,” & MM_dbValues & “)” If (Not MM_abortEdit) Then ‘ execute the insert Set MM_editCmd = Server.CreateObject(“ADODB.Command”) MM_editCmd.ActiveConnection = MM_editConnection MM_editCmd.CommandText = MM_editQuery MM_editCmd.Execute ‘ Modify the order items to have the same ID Set FixOrder = Server.CreateObject(“ADODB.Command”) FixOrder.ActiveConnection = MM_editConnection FixOrder.CommandText = “UPDATE tblCart SET orderID=’” & orderStr & “‘ WHERE username=’” & Session(“MM_Username”) & “‘ AND orderID=’’” FixOrder.Execute If (MM_editRedirectUrl <> “”) Then Call Response.Redirect(MM_editRedirectUrl) End If End If End If %> <% Dim rsCart__varUsername rsCart__varUsername = “testuser” if (Session(“MM_Username”) <> “”) then rsCart__varUsername =

721

D

722

Appendix D

Session(“MM_Username”) %> <% Dim rsCartTotal__varUsername rsCartTotal__varUsername = “testuser” if (Session(“MM_Username”) <> “”) then rsCartTotal__varUsername = Session(“MM_Username”) %> <% Dim rsUserInfo__varUsername rsUserInfo__varUsername = “testuser” if (Session(“MM_Username”) <> “”) then rsUserInfo__varUsername = Session(“MM_Username”) %> <% set rsCart = Server.CreateObject(“ADODB.Recordset”) rsCart.ActiveConnection = MM_connCatalog_STRING rsCart.Source = “SELECT tblCart.prodID,tblProduct.prodName,tblProduct.ProdPrice FROM tblCart,tblProduct WHERE tblCart.username=’” + Replace(rsCart__varUsername, “‘“, “‘’”) + “‘ AND tblCart.prodID=tblProduct.prodID AND tblCart.orderID=’’” rsCart.CursorType = 0 rsCart.CursorLocation = 2 rsCart.LockType = 3 rsCart.Open() rsCart_numRows = 0 %> <% set rsCartTotal = Server.CreateObject(“ADODB.Recordset”) rsCartTotal.ActiveConnection = MM_connCatalog_STRING rsCartTotal.Source = “SELECT sum(tblProduct.ProdPrice) FROM tblCart,tblProduct WHERE tblCart.username=’” + Replace(rsCartTotal__varUsername, “‘“, “‘’”) + “‘ AND tblCart.prodID=tblProduct.prodID AND tblCart.orderID=’’” rsCartTotal.CursorType = 0 rsCartTotal.CursorLocation = 2 rsCartTotal.LockType = 3 rsCartTotal.Open() rsCartTotal_numRows = 0 %> <% set rsUserInfo = Server.CreateObject(“ADODB.Recordset”) rsUserInfo.ActiveConnection = MM_connCatalog_STRING rsUserInfo.Source = “SELECT * FROM tblUserInfo WHERE username=’” + Replace(rsUserInfo__varUsername, “‘“, “‘’”) + “‘“ rsUserInfo.CursorType = 0 rsUserInfo.CursorLocation = 2 rsUserInfo.LockType = 3 rsUserInfo.Open() rsUserInfo_numRows = 0 %> <% set rsOrderInfo = Server.CreateObject(“ADODB.Recordset”) rsOrderInfo.ActiveConnection = MM_connCatalog_STRING

Custom Code Listings

rsOrderInfo.Source = “SELECT * FROM tblOrderInfo” rsOrderInfo.CursorType = 0 rsOrderInfo.CursorLocation = 2 rsOrderInfo.LockType = 3 rsOrderInfo.Open() rsOrderInfo_numRows = 0 %> <% Dim Repeat1__numRows Repeat1__numRows = -1 Dim Repeat1__index Repeat1__index = 0 rsCart_numRows = rsCart_numRows + Repeat1__numRows %> Catalog <meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1”>
  Shopping Cart

Product Categories:

 

 

 

 

 

 

 

 

 

 

 

 

 



723

D

724

Appendix D

<% While ((Repeat1__numRows <> 0) AND (NOT rsCart.EOF)) %> <% Repeat1__index=Repeat1__index+1 Repeat1__numRows=Repeat1__numRows-1 rsCart.MoveNext() Wend %>
Product ID Name Price
<%=(rsCart.Fields.Item(“prodID”).Value)%> <%=(rsCart.Fields.Item(“prodName”).Value)%> <%= FormatCurrency((rsCart.Fields.Item(“ProdPrice”).Value), 2, -2, -2, -2) %>
  Total: <%= FormatCurrency((rsCartTotal.Fields.Item(“sum(tblProduct.ProdPrice)”).Value), -1, -2, -2, -2) %>

” name=”frmFinalOrder” method=”POST”>
Shipping Info
Address 1: ”>


Custom Code Listings

Address 2:
”>
City: ”>
State: ”>

Zip:

”>
Billing Info
Address 1: ”>
Address

725

D

726

Appendix D

2:
”>
City: ”>
State: ”>
Zip: ”>
   
Payment Method: <select name=”paymethod”>
Account Number:

Custom Code Listings

Expiration Date:
<% rsCart.Close() %> <% rsCartTotal.Close() %> <% rsUserInfo.Close() %> <% rsOrderInfo.Close() %>

727

D

INDEX Symbols + (plus sign), 435

A absolute positioning, 622 absolute URLs, 43 access database access, 224 restricted to Web pages, 544 Access, ODBC data sources, 246-247 actions adding to client behaviors, 111-113 drag layer action adding to drag-anddrop systems, 123-128

advanced properties, 125-128 constraining drag motion, 124 Drag Targets, setting, 124 HTML editor search features, 34 Open Browser Window action, 120-121 set text action, adding to status bar behavior, 115 Active Server Pages (ASP), 201-202, 224 ActiveState, Perl add-on, 173 administrative interface (online testing systems), 573-576 ADO (ActiveX Data Objects), 226

ADO/ODBC (Open Database Connectivity), 226 database connections, 227-228 advanced queries, 364-366 configuring, 435 defining, 441 errors, 624-627 complex queries, 627 identical field names, 624-626 lengthy queries, 626 advanced query configuration dialog box, 365 advanced recordset queries, 322-323 advertisement banners implementing, 435-437 randomizing, 432, 435 sample data, 433-434 SQL queries, 434-435 table definitions, 432-433

730

Align attribute

Align attribute, 56 aligning images and text (tables), 56, 79 Allaire JRun, 203 Allaire Web site, 203, 633 animation, 110 timelines, 128-134 frames, 129 keyframes, 131 paths, 132-133 timeline pop-up menu functions, 133-134 Timelines palette, 129-131 answer pop-up menu (online testing systems), 560-562 Apache, mode_perl library, 173 Apple Web site, 235 Application Server category, 225 application server files, viewing, 225 application variables, 176 applications storing, 225 linking to databases, 224 applying styles, 152-153 arithmetic operators, 663 ASCII mode (transferring files), 95 ASP (Active Server Pages), 201-202, 224 ASPFree.com Web site, 633 Asset manager, 165 Assets palette, 28 Library area, 159 resource icons, 165 Templates area, 163

attributes, 182 Align attribute, 56 background attributes, 155 binding data to, 297-298 block attributes, 155-156 border attributes, 156 box attributes, 156 Char Width attribute (form fields), 312 content page (customized Web sites), 507-509 dynamic layer attributes, 296-301 extensions attributes, 157 Init Val attribute (form fields), 313 layer attributes, 70 list attributes, 156-157 Max Chars attribute (form fields), 313 Num Lines attribute (form fields), 313 page attributes, 49-50 positioning attributes, 157 style attributes, 155-157 tables, cellpadding attribute, 52 tag attributes, setting dynamically, 484 text attributes, 54-55 type attributes, 155 Wrap attribute (form fields), 313 authentication customized Web sites, 487-488 HTTP authentication, 398 User Authentication behaviors, 528, 535 authentication systems, 420, 595-598 Check New Username server behavior, 596

Insert Record server behavior, 596 Log In User behavior, 598 login pages, 597-598 registration page, 595-597 author’s Web site, 173 auto-generated code, 306

B backend databases (database-driven screens) creating, 280-282 image-ready database back ends, 291-292 page layout with dynamic layer attributes, 296-301 background attributes (styles), 155 badlogin page (online testing systems), 555 badlogin.asp file, 536 banner ads implementing, 435-437 randomizing, 432, 435 sample data, 433-434 SQL queries, 434-435 table definitions, 432-433 banner tables, 433 base icon (Head Elements palette), 23 behaviors, 110-124, 253-266 adding to Update Profile page, 538-539 Behaviors palette, 28, 110 Check New Username, 534, 596 Command, 261 comparing to traditional databases, 262

browsers

creating, 111-115, 273-275 actions, adding, 111-113 events, adding, 113-114 Delete Record, 260-261, 325-326, 474-475, 604 drag-and-drop systems advanced properties, 125-128 constraining drag motion, 124 creating, 122-128 drag layer action, adding, 123-128 Drag Targets, setting, 124 Dynamic Element, 265-266 dynamic form elements, creating, 331-332 dynamic menus (catalog systems), 382-383 dynamic-element, 590 editing, 115 Go To Detail Page, 340, 593 Go To Related Page, 414-415 parameters, adding, 466-468 Hide Region catalog systems, 392-393 online testing systems, 568-569 Insert Record, 257-258, 318-320, 498, 512-513, 596, 599-600, 607-608 Log In User, 536, 555, 598

Move To, 263-264 search results page (catalog systems), 386-388 Move To Next Record (online testing systems), 559 Move To Specific Record, 592 pop-up browser windows, 120-121 problems, 623-629 advanced queries, 624-627 duplicate data within forms, 631 embedded code, deleting, 624 embedded loops, 628-629 multiple primary keys, 628 recordsets, 255-257 redirect, 605 removing, 540 Repeat Region, 263, 286 Restrict Access To Page, 572 Server Behavior Builder, 274 server behavior editor, 273-275 ServerBehavior and Commands folder, 254 Show Region, 264-265, 405-407, 412, 464, 594-595 catalog systems, 391-393 status bar behavior, 115-118 tooltips, 118-120

731

Update Record, 258-260, 329-330 REPLACE INTO statement, 259-260 User Authentication behaviors, 270-273, 528, 535 Check New Username, 272-273 Log In User, 270-271 Log Out User, 272 Restrict Access To Page, 271-272 Validate Form, 630 Behaviors palette, 28, 110 BIGINT data type, 662 binary mode (transferring files), 95 binding data to attributes, 297-298 images to image fields, 436 recordsets to pop-up menus, 538 binding data, setting, 437 binding screens, 436 BLOB data type, 663 blobs (binary objects), 457 block attributes (styles), 155-156 BlooBerry Web site, 632 border attributes (styles), 156 bottom icon (Frame palette), 22 Box attributes (styles), 156 broken links, fixing, 100 browser size setting (document window), 13 browsers checking code, 77 configuring for cookies, 417

732

browsers

cookies, 177-178 Internet Explorer. See Internet Explorer Netscape Navigator. See Netscape Navigator pop-up browser windows, 120-121 bulletin board systems, 456-460 main message listing page, 461-470 Go To Related Page server behavior, adding parameters, 466-468 message list, sorting, 465-466 message listing, creating, 461-465 search function, 468-470 source code, 672-680 message composition form, 477-479 message IDs, 458-459 message viewing page, 470-476 Delete Record behavior, adding, 474-475 layout, 473-474 linking to message listing view, 470 main message listing, linking to, 476 message deletion, 474-475 recordsets, creating, 471-472 replies, adding, 470 reply listing, 473-474 reply screen, linking to, 476 source code, 680-684

moderated message boards, 459 site map, defining, 456-457 SQL database, creating, 457-460 button icon (Form palette), 21 buttons Flash buttons, adding, 134-135 New (Connection dialog box), 227 radio buttons (forms), 317 refresh, viewing randomized images, 437 Select file from Datasource, 436 Startup, 240 submit buttons (forms), 313-317 image buttons, 315-316 naming, 314 reset buttons, 314 reset() function (JavaScript), 316-317 submit() function (JavaScript), 316-317 Test, 231

C calculations in queries, 359-360 Cascading Style Sheets (CSS), 144-146, 149-158 external style sheets, 153-154

styles applying, 152-153 background attributes, 155 block attributes, 155-156 border attributes, 156 box attributes, 156 creating, 150-152 CSS Selector, 151 custom styles, 151 extensions attributes, 157 list attributes, 156-157 positioning attributes, 157 redefined HTML tags, 151 type attributes, 155 type definition screen, 151 catalog items (e-commerce catalog systems), 584-585 catalog systems, 369-379 designing, 379-393 detail page, 388-390 related items, 390-391 search form, 380-383 search results page, 383-388 Show Region behavior, 391 e-commerce catalog systems. See e-commerce catalog systems primary product table, 371-372 product category table, 371 queries, 375-379 searching product database, 375-377 showing related products, 377-379

Code Inspector palette

Recordset Navigation Bar object, 394 Recordset Navigation Status object, 393-394 related-item feature, 372-373 site map, 370 SQL, 374-375 categories (Applicaton Server), 225 cellpadding attribute (tables), 52 cells (tables) joining, 58 layout cells, 60 splitting, 58 CFScript looping constructs, 213-214 variables, 211 CGIs (Common Gateway Interfaces), 172-173 Char Width attribute (form fields), 312 char() data type, 350, 662 Character palette, 17 characters, inserting, 17 check box icon (Form palette), 21 check boxes (forms), 317 Check In/Out system, 101-102 Check Links Sitewide command (Site menu), 99 Check New Username behavior, 272-273, 534, 596 Check Spelling dialog box, 50 Check Target Browsers command (File menu), 77

checking code, 77 checkout page source code (e-commerce catalog systems), 715-719 checkout system (e-commerce site), 601-609 final checkout page, 605-609 Insert Record behavior, 607-608 orderID, generating, 608-609 recordsets, 606-607 tblCart table, updating, 608-609 shopping cart view, 601-605 Delete Record behavior, 604 DeleteID radio button, 603 MM_recordId check, disabling, 604-605 recordsets, 601-602 redirect server behavior, 605 Chili!Soft Web site, 201 classes, GROUP BY classes, 668 CLASSPATH, setting, 237-238 clauses LIMIT, 434, 441 LIMIT 1, 434 ORDER BY, 434, 440, 524 WHERE, 523-524 update command, 353-354

733

client behaviors, 110-124 Behavior palette, 110 creating, 111-115 actions, adding, 111-113 events, adding, 113-114 drag-and-drop systems advanced properties, 125-128 constraining drag motion, 124 creating, 122-128 drag layer action, adding, 123-128 Drag Targets, setting, 124 editing, 115 pop-up browser windows, 120-121 status bar behavior, 115-118 tooltips, 118-120 code. See also source code auto-generated code, 306 checking, 77 debugging. See debugging finding, 450 reusing, 144-147 common components, 146-147 libraries, 146-147 server-side includes (SSI), 146 style sheets, 144-146 templates, 147 Code and Design mode, 31 Code Colors preferences, 37 Code Format preferences, 38 Code Inspector palette, 29

734

Code Inspector window

Code Inspector window editing HTML, 32 search features, 33 code listings customized Web sites content page, 686-692 login page, 685-686 e-commerce catalog systems checkout page, 715-719 detail screen, 704-714 final checkout page, 719-727 guestbook, 669-672 HTML generated with dynamic layer attributes, 299 HTML input form, 309-310 message board systems main message listing page, 672-680 message viewing page, 680-684 quiz form (online testing systems), 692-704 Code Rewriting preferences, 38 coding problems, 613-614 ColdFusion, 204-205 conditionals, 213-214 database connections, 226 databases, managing, 229-230 dynamic elements, 215-216 looping constructs, 213-214 variables, 211

ColdFusion dialog box, 230 ColdFusion server, logging in, 230 ColdFusion Studio, 205 color pickers, 53 colors tables, setting colors, 53 Web safe colors, 54 Command behavior, 261 commands Commands menu, Edit Command List command 166 create command, 348 Data Source Name, 229 delete command, 355-356 deleting, 166 drop command, 349, 351 Edit menu, Site FTP category command, 94 File menu Check Target Browsers command, 77 New from Template command, 164 INSERT command, 351-352 Insert menu Head and Refresh command, 48 Insert Image command, 436 Modify menu Connections command, 226 Make Link command, 437 Page Properties command, 49 recording, 166-167 renaming, 166 select command, 356

Site menu Check Links Sitewide command, 99 New Site command, 42 temporary commands, recording, 167 update command, 352-355 WHERE clause, 353-354 View menu, Live Data command, 285 Windows menu, Site Files command, 43 Commands menu, Edit Command List command, 166 comment boards, 451 comment forms, 448 comment icon (Invisible Elements palette), 24 comment table, 445 comments (programming concepts), 209 Common Gateway Interfaces (CGIs), 172-173 Common palette, 18-19, 25-26 complex queries (advanced queries), 627 complex searches, 518-523 percentage matches, 525 responses, weighing, 525-526 thresholds, 523-525 conditionals, 211-214 CFScript, 213-214 ColdFusion, 213-214 Java, 212-213 VBScript, 212

current date icon

Configuration directory, ServerBehavior and Commands folder, 254 configuration files, editing, 655-660 configuring advanced queries, 435 browsers for cookies, 417 databases, 245-247 local databases, 224 connection string, 228-229 FTP, 93-96 JDBC connections, 230-231 servers, JDBC-ODBC, 236-239 Web sites, 42-44 Connection dialog box, 226 connection string database configuration, 228-229 connections database, 225-226 ADO/ODBC, 226-228 ColdFusion, 226 creating, 226-227 defining, 225-226 Macintosh, 226 multiple, 225 DSN (UltraDev), 228 Java-ODBC, 233-234 JDBC, configuring, 230-231 naming, 227 passwords, 228 servers, 91-96, 252-253 direct connection, 91 file transfers, 96-98 FTP, 93-96

Local/Network connection, 92 SourceSafe database, 92 WebDAV, 92 testing, 231-233 troubleshooting, 232 usernames, 228 Connections command (Modify menu), 226 constraining drag motion (drag-and-drop systems), 124 content pages creating (site map tool), 89 customized Web sites, 504-509 attributes, adding, 507-509 layer template, 509 recordsets, 505-507 source code, 686-692 contextual menus, 11 control panels ODBC Data Sources, 245 Services, 240 cookies, 177-178 configuring browsers for, 417 customized Web sites, 486 session management (login systems), 408-409, 415-419 disclaimers, 416-417 session variables, 416-419, 422 setting, 417-418 using in queries, 419

735

setting in ColdFusion, 216 in customized Web sites, 502-503 in JSP, 215 in VBScript, 214 count() function, 361 create command, 348 cross-platform Web sites, font problems, 144-146 crosshair icon, 54 CSS (Cascading Style Sheets), 144-146, 149-158 external style sheets, 153-154 styles applying, 152-153 background attributes, 155 block attributes, 155-156 border attributes, 156 box attributes, 156 creating, 150-152 CSS Selector, 151 custom styles, 151 extensions attributes, 157 list attributes, 156-157 positioning attributes, 157 redefined HTML tags, 151 type attributes, 155 Type definition screen, 151 CSS Selector, 151 CSS Styles palette, 29, 150 CSS Styles preferences, 38 CURDATE() function, 440 current date icon (Common palette), 19

736

CURTIME() function

CURTIME() function, 440 custom styles, 151 customized Web sites, 484-486 content page, 504-509 attributes, adding, 507-509 layer template, 509 recordsets, 505-507 source code, 686-692 cookies, 486 login page, source code, 685-686 login system, 496-503 login pages, 500-503 registration pages, 496-499 preferences page, 510-514 existing preferences, deleting, 513-514 hidden fields, 512 Insert Record behavior, 512-513 pop-up menus, 511-512 site map, 485-486 table definitions, 487-495 authentication, 487-488 content, creating, 492-494 default preferences, 495 features and options, 488-492 optimizing database structures, 490-492 user preferences, 487-488 customizing document window, 14-15 UltraDev environment, 655-660 dialog boxes, 657-660 menus, 656-657 windows, 657-660

D data adding to databases, 351-352 banner ads, randomizing, 433-434 deleting from databases, 355-356 inserting into tables, 530-532 updating in databases, 352-355 data binding window, 266-267 data bindings, 266-269 design view bindings, 267-269 data formats, 268-269 dynamic data, 266-267 Request Variable data binding, 497 setting, 437 Data Bindings palette, 28, 265-266, 451, 540 design view bindings, 267-268 data formats (design view bindings), 268-269 Data Source Name command, 229 Data Source Name (DSN), 227-228 data sources (ODBC) Access, 246-247 MySQL, 244-246 data types, 350-351, 661-663 database connections, 225-228 ADO/ODBC, 226-228 ColdFusion, 226 creating, 226-227

defining, 225-226 Macintosh, 226 multiple, 225 database design, 181-194 attributes, 182 database keys, defining, 192 entities, 182 foreign keys, defining, 192 normalization, 182-190, 196 first normal form, 184-189 second normal form, 189 third normal form, 190 primary keys, defining, 191-192 relationships, 183 SQL, 193-194 unique identifiers, 182-183 database fields, matching form elements, 449 database objects, 347 database structures (customized Web sites), optimizing, 490-492 database-driven screens, 280. See also dynamic Web sites dynamic layer attributes, 296-301 images, adding to recordsets, 290-294 layout, 295-301 reports, 280 sorting records, 301-302 tables, 280-290 backend database, creating, 280-282 data layout, 288-290 data, adding, 284

debugging

front end database, creating, 282-290 live data previews, 284-285 multiple records, displaying, 286-287 recordsets, setting up, 283 databases, 347 accessing, 224 backend databases (database-driven screens) creating, 280-282 image-ready database back ends, 291-292 page layout with dynamic layer attributes, 296-301 comparing to server behaviors, 262 configuring, 245-247 connection string, 228-229 creating, 348-349 data adding, 352 delete command, 355-356 INSERT command, 351-352 update command, 352-355 detail screens, 321-325 advanced recordset queries, 322-323 filters, setting, 321-322 linking to, 326-329 testing with Live Data view, 324-325 variable passing types, 321-322

forms, 307-318 check boxes, 317 file fields, 317 hidden fields, 318 HTML forms, creating, 308-310 Insert Record behavior, 318-320 Jump menus, 318 list/menu, 317 radio buttons, 317 submit buttons, 313-317 front end databases (database-driven screens) creating, 282-290 data layout, 288-290 data, adding, 284 live data previews, 284-285 multiple records, displaying, 286-287 recordsets, setting up, 283 linking to applications, 224 local, configuring, 224 Macintosh OS, 233 managing (ColdFusion), 229-230 message board systems, 457-460 not null modifier attribute, 350 password field, 536 primary keys, 350 product database (catalog systems), searching, 377 records, deleting, 325-326 tables creating, 349 deleting, 351 joining, 357-360

737

querying, 356-362 sorting information, 357 summarization functions, 360-362 update page, linking to master listing page, 340-341 update screens, 329-333 dynamic form elements, 331-333 Update Record behavior, 329-330 username field, 536 date and time functions, 667-668 date data type, 350 DATETIME data type, 662 DAYNAME() function, 439 DAYOFWEEK() function, 439 DAYOFYEAR() function, 439 debuggers, JavaScript debugger, 138-139 debugging, 613-614 HTML design errors, 614-623 forms, 617-619 layers, 619-623 tables, 614-617 server behavior problems, 623-629 advanced queries, 624-627 duplicate data within forms, 631 embedded code, deleting, 624 embedded loops, 628-629 troubleshooting resources, 632-633

738

DECIMAL data type

DECIMAL data type, 662 default preferences (customized Web sites), 495 Define Sites dialog box, 42 defining advanced queries, 441 database connections, 225-226 database keys, 192 foreign keys, 192 framesets, 73-74 primary keys, 191-192 queries, manually, 435 Web sites, 42-44 site map tool, 89 delete command, 355-356 Delete Record behavior, 260-261, 325-326, 474-475, 604 DeleteID radio button (e-commerce catalog systems), 603 deleting commands, 166 data in databases, 355-356 keyframes from timelines, 131 library items, 161 records, 325-326 server behaviors, 540 tables, 351 description icon (Head Elements palette), 23 deselecting palettes, 30 design notes, 103-104 design view bindings, 267-269 designing catalog systems, 379-393 detail page, 388-390 related items, 390-391 search form, 380-383

search results page, 383-388 Show Region behavior, 391 Web sites, 44-45 detaching Web pages from templates, 164 detail link configuration dialog box, 327-328 detail page (catalog systems), 388-390 detail screens, 321-325 advanced recordset queries, 322-323 e-commerce catalog systems, 592-593 linking to search results page, 593 related items, adding, 593-594 source code, 704-714 filters, setting, 321-322 linking to, 326-329 testing with Live Data view, 324-325 variable passing types, 321-322 DevEdge Online Web site, 114 DHTML (Dynamic HTML), 108-110 animation, 110 client behaviors, 110-124 actions, adding, 111-113 Behavior palette, 110 creating, 111-115 drag-and-drop systems, creating, 122-128 editing, 115 events, adding, 113-114

pop-up browser windows, creating, 120-121 status bar behavior, creating, 115-118 tooltips, creating, 118-120 Flash content, 134-136 JavaScript, 108 JavaScript debugger, 138-139 limitations, 109 style sheets, 108 timelines, 128-134 frames, 129 keyframes, 131 paths, 132-133 timeline pop-up menu functions, 133-134 Timelines palette, 129-131 dialog boxes advanced query configuration, 365 Check Spelling, 50 ColdFusion, 230 Connection, 226 customizing, 657-660 Define Sites, 42 detail link configuration, 327-328 Link External Style Sheet, 154 New Style, 150 Page Properties, 49-50 directories (MySQL), 241 DirectX icon, 26 disclaimers (cookies), 416-417 displaying records, 451 distance education, 547 docking palettes, 30

Dynamic HTML (DHTML)

document window, 11-15 customizing, 14-15 design size, 13 download time/page size estimation, 14 grids, 14 objects, selecting, 12-13 resizing, 13 rulers, 14 tracing images, 15 DOM (Document Object Model), 109 DOUBLE data type, 662 downloading download time estimation (document window), 14 UltraDev packages, 167-169 drag-and-drop systems (Web pages), 122-128 advanced properties, 125-128 constraining drag motion, 124 drag layer action, adding, 123-128 Drag Targets, setting, 124 drag layer action adding to drag-and-drop systems (Web pages), 123-128 advanced properties, 125-128 constraining drag motion, 124 Drag Targets, setting, 124 drivers Java, identifying, 231 JDBC, 252 Macintosh JDBC Client, 234-236 troubleshooting, 236

RmiJdbc, 234 installing, 235 as service, 239-240 drop command, 349-351 DSN (Data Source Name), 227-228 duplicate usernames, 534 duplicate values, testing, 631 duplicate.asp file, 534 dynamic authoring tools, 252 connections, 252-253 data bindings, 266-269 design view bindings, 267-269 dynamic data, 266-267 server behaviors, 253-266 Command behavior, 261 comparing to traditional databases, 262 creating, 273-275 Delete Record, 260-261 Dynamic Element, 265-266 Insert Record, 257-258 Move To behaviors, 263-264 recordsets, 255-257 Repeat Region, 263 Server Behavior Builder, 274 server behavior editor, 273-275 ServerBehavior and Commands folder, 254 Show Region, 264-265 Update Record, 258-260 User Authentication, 270-273

739

dynamic data, data bindings, 266-267 dynamic elements adding to Web sites, 137 programming languages, 214-216 ColdFusion, 215-216 Java, 215 VBScript, 214 tag attributes, setting dynamically, 484 Dynamic Elements server behaviors, 265-266 dynamic form elements, 331-333 Dynamic HTML (DHTML), 108-110 animation, 110 client behaviors, 110-124 actions, adding, 111-113 Behavior palette, 110 creating, 111-115 drag-and-drop systems, creating, 122-128 editing, 115 events, adding, 113-114 pop-up browser windows, creating, 120-121 status bar behavior, creating, 115-118 tooltips, creating, 118-120 Flash content, 134-136 JavaScript, 108 JavaScript debugger, 138-139 limitations, 109 style sheets, 108

740

Dynamic HTML (DHTML)

timelines, 128-134 frames, 129 keyframes, 131 paths, 132-133 timeline pop-up menu functions, 133-134 Timelines palette, 129-131 dynamic images, adding to recordsets (databasedriven screens), 292-293 dynamic layer attributes, layout of database-driven screens, 296-301 dynamic menus (catalog systems), 382-383 dynamic search results, 543 dynamic Web sites, 172-181, 225. See also databasedriven screens banner ads implementing, 435-437 randomizing, 432, 435 sample data, 433-434 SQL queries, 434-435 table definitions, 432-433 CGIs (Common Gateway Interfaces), 172-173 creating, 179-181 database design, 181-194 attributes, 182 database keys, defining, 192 entities, 182 foreign keys, defining, 192 normalization, 182-190, 196 primary keys, defining, 191-192

relationships, 183 SQL, 193-194 unique identifiers, 182-183 designing, 485 embedded HTML languages, 173 guestbooks HTML, creating, 447-451 SQL queries, 445-447 table definitions, 444-445 user feedback, 444 HTML, creating, 447-451 images seasonal/time-based, 438-439, 442-444 SQL queries, 439-444 table definitions, 439 planning, 180-181 server connections, 252-253 session management, 174-178 cookies, 177-178 variable passing, 174-177 transitioning from static, 430-432 types, 179 user feedback, 444-447 SQL queries, 445-447 table definitions, 444-445 dynamic-element server behavior, 590

E e-commerce catalog systems, 580-609 checkout page, source code, 715-719 checkout system, 601-609 final checkout page, 605-609 shopping cart view, 601-605 detail screen, 592-593 linking to search results page, 593 related items, adding, 593-594 source code, 704-714 final checkout page, source code, 719-727 Insert Record behavior, 599-600 Next link, hiding, 594-595 order information table, 587 OwnerInfo table, 586 Previous link, hiding, 594-595 product category table, 584 product table, 584-585 related items, adding to detail screen, 593-594 search form, 590-591 search results page, 591-592 linking to detail page, 593 session IDs, 580-581 shopping cart, 599-601 Show Region behavior, 594-595

feedback (Web-page users)

site map, 582-584 table definitions, 584-589 catalog items, 584-585 product categories, 584 related items, 585 shopping cart information, 587 user information, 585-586 user accounts, 581-582 user authentication, 595-598 Check New Username server behavior, 596 Insert Record server behavior, 596 Log In User behavior, 598 login pages, 597-598 registration page, 595-597 UserInfo table, 585-586 Edit Command List command (Commands menu), 166 Edit menu, Site FTP category command, 94 editing client behaviors, 115 configuration files, 655-660 dialog boxes, customizing, 657-660 menus, customizing, 656-657 windows, customizing, 657-660 data in databases, 351-352 external style sheets, 153-154

files Check In/Out system, 101-102 design notes, 103-104 head elements, 47-48 HTML (HTML editor), 31-36 library items, 160 queries, 541 server behaviors, 273-275 elements of forms, matching with database fields, 449 email link icon (Common palette), 19 embedded HTML languages, 173 embedded loops, 628-629 embedded programming languages, 201, 306 embedding multiple framesets, 76 repeat regions, 277 empty (null) values, testing, 629-631 end of line (programming concepts), 209 end tags, missing end tags, 616 entities, 182 relationships, 183 normalization, 188-189 setting up in normalized forms, 184-187 error messages (login system), 536 errors, 613-614 HTML design errors, 614-623 forms, 617-619 layers, 619-623 tables, 614-617

741

server behavior problems, 623-629 advanced queries, 624-627 duplicate data within forms, 631 embedded code, deleting, 624 embedded loops, 628-629 troubleshooting resources, 632-633 events adding to client behaviors, 113-114 onMouseOver event, adding to status bar behavior, 115-118 extending UltraDev, 166-169 packages, downloading, 167-169 recording commands, 166-167 Extensible Markup Language (XML), 45 extensions attributes (styles), 157 external HTML editors, launching, 36 external style sheets, 153-154 eyedropper tool, 53

F feedback (Web-page users), 444-447 SQL queries, 445-447 table definitions, 444-445

742

fields

fields databases, matching form elements, 449 duplicate.asp, 534 file fields, 317 hidden fields, 318 adding to message composition form (message board systems), 478-479 adding to registration form (customized Web sites), 497-498 preferences page (customized Web sites), 512 images, binding to fields, 436 login.asp, 533 multiline text, 448 naming identical field names (advanced queries), 624-626 in option tables, 529 text fields, 312 password, 535-536 registration page, matching, 533 storing in comment table, 445 tblUserInfo, 533 text fields, 310-313 username, 536 checking, 534 file field icon (Form palette), 21 file fields (forms), 317 file layout (site maps), 83

File menu Check Target Browsers command, 77 New from Template command, 164 file selection (site map display), 88 file signatures (Macintosh), 96 file transfers, 96-98 File Types/Editors preferences, 38 files accessing on servers, 90 application server, viewing, 225 badlogin.asp, 536 configuration files, 655-660 dialog boxes, customizing, 657-660 menus, customizing, 656-657 windows, customizing, 657-660 duplicate.asp, 534 editing Check In/Out system, 101-102 design notes, 103-104 local files, 91 login.asp, 535, 544 naming conventions, 83-85 organizing (site map tool), 90 profile.asp, 538-540, 543 register.asp, 533 search.asp, 536, 543 searchresults.asp, 540, 543 template files. See templates

template restrictions, removing, 164 transferring, 95 filters, setting (detail screens), 321-322 final checkout page (e-commerce catalog systems), 605-609 Insert Record behavior, 607-608 orderID, generating, 608-609 recordsets, 606-607 source code, 719-727 tblCart table, updating, 608-609 Find In: attributes (HTML editor), 34 Find What section (HTML editor), 34 finding code in documents, 450 Fireworks HTML icon (Common palette), 19 first normal form (normalization), 184-189 entities, setting up, 184-187 relationships, 188-189 fixing broken links, 100 Flash content, 134-136 Flash icon (Common palette), 19-20 float data type, 350, 662 Floating Palettes preferences, 38 folders, ServerBehavior and Commands folder (Configuration directory), 254

functions

fonts differences between Macintosh and Windows, 144-146 HTML styles, 147-149 Fonts/Encoding preferences, 38 foreign keys, defining, 192 Form palette, 20-21 FORM tags, missing FORM tags, 618-619 formats, data formats (design view bindings), 268-269 forms, 307-318 check boxes, 317 comment, 448 duplicate data (server behaviors), 631 dynamic form elements, 331-333 elements, matching with database fields, 449 file fields, 317 generating, 333-334 Master Detail object, 334-337 Record Insert Form object, 337-338 Record Update Form object, 338-340 hidden fields, 318 HTML design errors, 617-619 HTML forms, creating, 308-310 Insert Record behavior, 318-320 Jump menus, 318 list/menu, 317 login, 536

message composition form (message board systems), 477-479 quiz form (online testing systems), 557-573 answer pop-up menu, 560-562 correct responses, measuring, 565-568 ending the quiz, 568-572 Move To Next record behavior, adding, 559 protecting the quiz, 572-573, 576 recordset, 558 source code, 692-704 user response, saving, 562-565 radio buttons, 317 registration pages (customized Web sites), 496-498 search forms catalog systems, 380-383 e-commerce catalog systems, 590-591 submit buttons, 313-317 image buttons, 315-316 naming, 314 reset buttons, 314 reset() function (JavaScript), 316-317 submit() function (JavaScript), 316-317 text fields, 310-313 update screens, 329-333 dynamic form elements, 331-333 Update Record behavior, 329-330

743

frames limitations, 76 subdividing, 75 timelines, 129 Frames palette, 21-22, 29, 74-75 framesets, 72-76 defining, 73-74 embedding multiple framesets, 76 Frames palette, 74-75 “get out of frames” link, creating, 79 limitations, 76 NoFrames Content, 75 properties, 73-75 subdividing frames, 75 front end databases (database-driven screens) creating, 282-290 data layout, 288-290 data, adding, 284 live data previews, 284-285 multiple records, displaying, 286-287 recordsets, setting up, 283 FScript, conditionals, 213-214 FTP, 91 configuring, 93-96 file transfers, 96-98 functions count(), 361 CURDATE(), 440 CURTIME(), 440 date and time functions, 667-668 DAYNAME(), 439 DAYOFWEEK(), 439 DAYOFYEAR(), 439

744

functions

group by, 361-362 JavaScript functions actions library, 111-113 reset(), 316-317 submit(), 316-317 mathematical functions, 664-665 max(), 360 min(), 361 MONTHNAME(), 439 MySQL, 439-440 NOW(), 440 password, 401 rand(), 434 string comparison functions, 664 string functions, 665-667 sum(), 361 summarization functions, 360-362 GROUP BY classes, 668 timeline pop-up menu functions, 133-134 UPPER, 377 WEEK(), 440

G Gamelan Web site, 137 General preferences, 37 Generator icon (Common palette), 20 GET method (variable passing), 175 “get out of frames” link, creating, 79 GNOME Web site, 206 Go To Detail Page behavior, 340, 593

Go To Related Page behavior, 414-415 parameters, adding, 466-468 graphics. See images Great Bridge Web site, 206 grids, 14 GROUP BY classes, summarization functions, 668 group by function, 361-362 guestbooks HTML, creating, 447-451 source code, 669-672 SQL queries, 445-447 table definitions, 444-445 user feedback, 444

H HEAD (add brackets) tag, 47 Head and Refresh command (Insert menu), 48 Head Element palette, 22-23 head elements, editing, 47-48 Help icon (Properties palette), 27 hidden field icon (Form palette), 21 hidden fields, 318 adding to message composition form (message board systems), 478-479 to registration form (customized Web sites), 497-498 preferences page (customized Web sites), 512

Hide Region behavior catalog systems, 392-393 online testing systems, 568-569 hiding Next and Previous links (e-commerce catalog systems), 594-595 palettes, 30 regions, 276 highlighted tags, 617 Highlighting preferences, 38 History palette, 29 horizontal rule icon (Common palette), 19 HTML (Hypertext Markup Language) creating, 447-451 design errors, 614-623 forms, 617-619 layers, 619-623 tables, 614-617 DHTML. See DHTML forms, creating, 308-310 library items, creating from existing HTML, 158 styles, 147-149 tags end tags, missing end tags, 616 FORM tags, missing FORM tags, 618-619 tag, 47 highlighted tags, 617 keywords metatags, 79 layer tag, 67 <META> tag, 47 referencing tag information, 33 refresh tag, 48 <TITLE> tag, 47 XHTML, 45

icons

HTML editor, 31-36 launching external editors, 36 line options, 32 referencing tag information, 33 Replace window, 33 search features, 33-36 actions, 34 Find In: attributes, 34 Find What section, 34 modifiers, 34-36 regular expressions, 35-36 transferring selections between views, 32 window modes, 32 HTML embedded languages, 173 HTML Styles menu, 147-148 HTML Styles palette, 29, 148 HTTP authentication, 398 HTTP protocol, 174

I IBM Software Web site, 203 icons base icon (Head Elements palette), 23 bottom icon (Frame palette), 22 button icon (Form palette), 21 check box icon (Form palette), 21 comment icon (Invisible Elements palette), 24

crosshair icon, 54 current date icon (Common palette), 19 description icon (Head Elements palette), 23 DirectX, 26 email link icon (Common palette), 19 file field icon (Form palette), 21 Fireworks HTML icon (Common palette), 19 Flash icon (Common palette), 19-20 form icon (Form palette), 20 Generator icon (Common palette), 20 Help icon (Properties palette), 27 hidden field icon (Form palette), 21 horizontal rule icon (Common palette), 19 image field icon (Form palette), 21 images icon (Common palette), 18 Java applet icon (Common palette), 26 Jump Menu icon (Form palette), 21 keywords icon (Head Elements palette), 23 layers icon (Common palette), 19 left icon (Frame palette), 22 left top icon (Frame palette), 22 lightning bolt icon, 225

745

link icon (Head Elements), 23 metatags icon (Head Elements palette), 23 named anchor icon (Invisible Elements palette), 24 navigation bar (Common palette), 19 Netscape Plug-in icon, 26 Quick Tag Editor icon (Properties palette), 27 radio buttons icon (Form palette), 21 refresh icon (Head Elements palette), 23 right icon (Frame palette), 22 rollover icon (Common palette), 18 scripts icon (Invisible Elements palette), 24 selection lists icon (Form palette), 21 server-side includes icon (Common palette), 19 Shockwave icon (Common palette), 20 site map display, 87 site map tool, 86 split icon (Frame palette), 22 table icon (Common palette), 18 tabular data icon (Common palette), 19 text fields icon (Form palette), 20 top icon (Frame palette), 22 top left icon (Frame palette), 22

746

identical field names (advanced queries)

identical field names (advanced queries), 624-626 identifying drivers (Java), 231 image buttons (forms), 315-316 image field icon (Form palette), 21 Image Map tools (Image Properties palette), 62-63 image maps, creating, 61-63 Image Properties palette, Image Map tools, 62-63 image-ready database back ends, 291-292 images adding to recordsets (database-driven screens), 290-294 dynamic images, 292-293 image-ready database back end, 291-292 aligning text and images (tables), 56, 79 binding to image fields, 436 inserting into tables, 55 positioning, 58-59 precise image positioning, 57-58 rollover images, creating, 63-66 seasonal, 438-439, 442-444 SQL queries, 439-444 table definitions, 439 storing, 444 time-based, 438-439, 442-444 SQL queries, 439-444 table definitions, 439 tracing images, 15, 69

images icon (Common palette), 18 incomplete tables, 617 information, processing in tables, 529 Init Val attribute (form fields), 313 initial profiles (login systems), 532-534 INSERT command, 351-352 Insert Image command (Insert menu), 436 Insert menu Head and Refresh command, 48 Insert Image command, 436 Insert Record behavior, 257-258, 318-320, 498, 512-513, 533, 596, 599-600, 607-608 installers, Java installers, 237 installing drivers, RmiJdbc, 235 MySQL, 240-241, 244 UltraDev packages, 168 int data type, 350, 662 integer data type, 662 interfaces UltraDev interface, 8-9 document window, 11-15 HTML editor. See HTML editor menu system, 9-10 Objects palette. See Objects palette Properties palette, 26-28 Windows menu, 28-30 WYSIWYG interface, 11

Internet Explorer configuring for cookies, 417 end tags, missing end tags, 616 FORM tags, missing FORM tags, 618 invalid logins (customized Web sites), 501 Invisible Elements palette, 24 Invisible Elements preferences, 38 iPlanet Web Server, 203 iPlanet Web site, 203

J Jakarta Project Web site, 203 Java conditionals, 212-213 dynamic elements, 215 looping constructs, 212-213 variables, 210-211 Java applet icon (Common palette), 26 Java drivers, identifying, 231 Java installers, 237 Java objects, adding to Web sites, 137 Java Server Pages (JSP), 202-204, 224 Java servlets, 202 Java-ODBC connections, 233-234 java.sun.com Web site, 203

lengthy queries (advanced queries)

JavaScript, 108 client behaviors, 110-124 actions, adding, 111-113 Behavior palette, 110 creating, 111-115 drag-and-drop systems, creating, 122-128 editing, 115 events, adding, 113-114 pop-up browser windows, creating, 120-121 status bar behavior, creating, 115-118 tooltips, creating, 118-120 customizing the UltraDev environment, 658-660 disabling in Netscape Navigator, 621 Document Object Model (DOM), 109 functions (actions library), 111-113 limitations, 109 reset() function, 316-317 rollover images, creating, 63-66 rollover navigation bars, creating, 66-67 submit() function, 316-317 JavaScript debugger, 138-139 JavaScript elements, limitations of, 67 JDBC Client driver (Macintosh OS), 234-236 JDBC connections, configuring, 230-231

JDBC drivers, 252 troubleshooting, 236 JDBC-ODBC servers, configuring, 236-239 joining table cells, 58 tables, 357-360 calculations, 359-360 JSPtags Web site, 632 Jump Menu icon (Form palette), 21 Jump menus (forms), 318

K KDE Web site, 206 keyboard shortcuts, accessing Quick Tag Editor, 28 keyframes (timelines), 131 keys foreign keys, defining, 192 primary keys, 350 defining, 191-192 multiple primary keys (server behaviors), 628 keywords icon (Head Elements palette), 23 keywords metatags, 79

L languages. See programming languages Launcher palette, 28 launching external HTML editors, 36 layer tag, 67

747

layer template (customized Web sites), 509 layers, 19, 67-72, 79 absolute positioning, 622 adding to Web sites, 69 animating (Timelines palette), 129-131 attributes, 70 converting to tables, 71-72 HTML design errors, 619-623 layout of database-driven screens, 296-301 positioning elements, 68-69 preventing layer overlaps, 71 property inspector, 70 relative positioning, 621-623 selecting, 69 tooltips, creating, 118-120 viewing with Layers palette, 71 layers icon (Common palette), 19 Layers palette, 29, 71 Layers preferences, 38 layout database-driven screens, 295-301 selecting (site map display), 89 layout cells (tables), 60 layout mode (tables), 59-61 layout tables, 60 Layout View preferences, 39 left icon (Frame palette), 22 left top icon (Frame palette), 22 lengthy queries (advanced queries), 626

748

libraries

libraries, 158-161 Assets palette, 159 code reuse, 146-147 library items, 158-161 Library palette, 29 lightning bolt icons, 225 LIMIT 1 clause, 434 LIMIT clause, 434, 441 line breaks, inserting, 18 line options (HTML editor), 32 link definition screen, 46 Link External Style Sheet dialog box, 154 link icon (Head Elements palette), 23 Link management options, 43 linkcheck program, 100 linking applications to databases, 224 to detail screens, 326-329 to external style sheets, 154 update page to master listing page, 340-341 links broken links, fixing, 100 creating, 46-47 “get out of frames” links, creating, 79 image maps, creating, 61-63 lists of links (navigation features), 61 setting links, 54 site map display, 87-88 site map tool, 90 text links, 61 verifying, 99-100

Linux, 206 List attributes (styles), 156-157 list menu (forms), 317 Live Data command (View menu), 285 live data previews, 284-285, 303 Live Data view, testing detail screens, 324-325 local databases, configuring, 224 local files, 91 Local/Network connection, 92 location (Web sites), setting, 42 Log In User behavior, 270-271, 536, 598 online testing systems, 555 Log Out User behavior, 272 logging in to servers (ColdFusion), 230 logical operators, 663 login checking query (login systems), 404 login forms, 536 login pages customized Web sites, 500-503 cookies, setting, 502-503 invalid logins, 501 recordsets, 501 source code, 685-686 valid logins, 501-503 e-commerce catalog systems, 597-598 login screens, 535-536 Log In User behavior, 536 login systems, 402-404 online testing systems, 554-556

password fields, 535 usernames, 535 login systems, 398-421, 532 customized Web sites, 496-503 login pages, 500-503 registration pages, 496-499 error messages, 536 HTTP authentication, 398 initial profiles, 532-534 login checking query, 404 login screen, 402-404 passwords, 400-402 registrations, 532-534 security, 420-421 session management, 408-415 cookies, 408-409, 415-419 Go To Related Page server behavior, 414-415 session IDs, 408 user identifiers, 408-410 variable passing, 409-414, 422 Show Region behavior, 405-407 SQL, 399-402 testing, 406 verification screen, 404-406 Web-based logins, 398-399 login.asp files, 533-535, 544 longblob data type, 663 longtext data type, 663 looping constructs, 211-214 loops, embedded loops, 628-629

message board systems

M Macintosh database connections, 226 file signatures, 96 fonts, 144-146 Macintosh JDBC Client driver, 234-236 Macintosh OS databases, 233 ODBC, 230 UtraDev, 228 Macromedia Web site, downloading UltraDev packages, 167-169 main message listing page (message board systems), 461-470 Go To Related Page behavior, adding parameters, 466-468 message list, sorting, 465-466 message listing creating, 461-465 Next link, 463-464 Previous link, 463-464 recordset definition, 462 search function, 468-470 Show Region server behavior, 464 source code, 672-680 maintaining Web sites, 99-100 Make Link command (Modify menu), 437 managing databases (ColdFusion), 229-230 manually defining queries, 435

many-to-many relationships, 183 maps (site maps), 82-83, 526 catalog systems, 370 customized Web sites, 485-486 e-commerce catalog systems, 582-584 file layout, 83 message board systems, 456-457 online testing system, 548 saving, 90 Master Detail object, 334-337 master listing page, linking to update page, 340-341 master style sheets, 169 matches, percentage matches, 525 matching fields in registration page, 533 mathematical functions, 664-665 Max Chars attribute (form fields), 313 max() function, 360 mediumblob data type, 663 mediumint data type, 661 mediumtext data type, 663 menus, 9-10 Commands menu, Edit Command List command, 166 contextual menus, 11 customizing, 656-657 dynamic menus, search forms (catalog systems), 382-383 Edit menu, Site FTP category command, 94

749

File menu Check Target Browsers command, 77 New from Template command, 164 HTML Styles menu, 147-148 Insert menu, Head and Refresh command, 48 Jump menus (forms), 318 Modify menu, Page Properties command, 49 pop-up menus customized Web sites, 511-512 recordsets, binding to, 538 Site menu Check Links Sitewide command, 99 New Site command, 42 View menu, Live Data command, 285 Windows menu, 28-30 Site Files command, 43 message board systems, 456-460 main message listing page, 461-470 Go To Related Page behavior, adding parameters, 466-468 message list, sorting, 465-466 message listing, creating, 461-465 search function, 468-470 source code, 672-680 message composition form, 477-479 message IDs, 458-459

750

message board systems

message viewing page, 470-476 Delete Record behavior, adding, 474-475 layout, 473-474 linking to message listing view, 470 main message listing, linking to, 476 message deletion, 474-475 recordsets, creating, 471-472 replies, adding, 470 reply listing, 473-474 reply screen, linking to, 476 source code, 680-684 moderated message boards, 459 site map, defining, 456-457 SQL database, creating, 457-460 messages error messages (login system), 536 storing in comment table, 445 metatags, 47 keywords metatags, 79 metatags icon (Head Elements palette), 23 methods (variable passing), 175 Microsoft Scripting Technologies Web site, 114 min() function, 361 missing end tags, 616 missing FORM tags, 618-619

MM_recordId check, disabling, 604-605 MM_Username session variable, 537 moderated message boards, 459 modifiers (HTML editor search features), 34-36 Modify menu Connections command, 226 Make Link command, 437 Page Properties command, 49 mod_perl library (Apache), 173 MONTHNAME() function, 439 Move To behaviors, 263-264 search results page (catalog systems), 386-388 Move To Next Record behavior (online testing systems), 559 Move To Specific Record behavior, 592 Move To submenu (Server Behavior palette), 263 multiline fields, 311, 448 multiple database connections, 225 multiple primary keys (behaviors), 628 MySQL arithmetic operations, 663 data types, 661-663 date and time functions, 667-668 functions, 439-440 installing, 240-241, 244 logical operations, 663

mathematical functions, 664-665 numeric comparisons, 663-664 ODBC data sources, 244-246 setting, 240 for UNIX, 241-243 for Windows, 240-241 string comparison functions, 664 string functions, 665-667 summarization functions (GROUP BY classes), 668 testing, 243-244 MySQL directory, 241 MySQL server, starting, 241 MySQL Web site, 632, 661

N named anchor icon (Invisible Elements palette), 24 naming commands, 166 connections, 227 fields form fields, 312 in option tables, 529 files, naming conventions, 83-85 library items, 160 submit buttons (forms), 314 navigation bar (catalog systems), 393-394 navigation bar icon (Common palette), 19

online testing systems

navigation bar tool, 66-67 navigation features, 61-67 image maps, creating, 61-63 JavaScript elements, limitations of, 67 lists of links, 61 rollover images, creating, 63-66 rollover navigation bars, creating, 66-67 nesting tables, 58 Netcraft Web site, 207 Netscape Navigator configuring for cookies, 417 end tags, missing end tags, 616 FORM tags, missing FORM tags, 618 JavaScript, disabling, 621 layers, 620-621 relative positioning, 621-623 Netscape Plug-in icon (Common palette), 26 New button (Connection dialog box), 227 New from Template command (File menu), 164 New Site command (Site menu), 42 New Style dialog box, 150 Next link e-commerce catalog systems, 594-595 message board systems, 463-464 NoFrames Content (framesets), 75

normalization, 182-190, 196 first normal form, 184-189 entities, setting up, 184-187 relationships, 188-189 second normal form, 189 third normal form, 190 not null modifier attribute, 350 not null values, testing, 629-631 NOW() function, 440 null values, testing, 629-631 Num Lines attribute (form fields), 313 numeric comparisons, 663-664

O Object Web (Web site), 234 objects binary objects (blobs), 457 database objects, 347 Recordset Navigation Bar object (catalog systems), 394 Recordset Navigation Status object (catalog systems), 393-394 selecting (document window), 12-13 Objects palette, 16-23, 333-334, 436 Character options, 17 Common options, 18-19 Form options, 20-21 Frame options, 21-22 Head Element options, 22-23

751

Invisible Elements options, 24 Master Detail object, 334-337 Record Insert Form object, 337-338 Record Update Form object, 338-340 Server Objects options, 24-25 Special Objects options, 25-26 ODBC (Open Database Connectivity) ADO/ODBC, 226 database connections, 227-228 data sources Access, 246-247 MySQL, 244-246 Macintosh OS, 230 ODBC Data Sources control panel, 245 one-to-many relationships, 183 one-to-one relationships, 183 online testing systems, 548-576 administrative interface, 573-576 login screen, 554-556 quiz form, 557-573 answer pop-up menu, 560-562 correct responses, measuring, 565-568 ending the quiz, 568-572 Move To Next Record behavior, adding, 559

752

online testing systems

protecting the quiz, 572-573, 576 recordset, 558 source code, 692-704 user response, saving, 562-565 site map, 548 SQL database, 549-554 data, adding, 551 question table, 550-551 user response table, 552-554 username and password table, 549 users, adding, 552 onMouseOver event, adding to status bar behavior, 115-118 Open Browser Window action, 120-121 Open Database Connectivity. See ODBC operating systems Macintosh OS databases, 233 ODBC, 230 UltraDev, 228 server operating systems, selecting, 205-209 operators, 663 optimizing database structures (customized Web sites), 490-492 Options table, 528-529 Oracle 8i Jserver, 203 Oracle Web site, 203 ORDER BY clause, 434, 440 calculation of difference, 524 order information table (e-commerce catalog systems), 587

order of recordsets, randomized, 438 orderID (e-commerce catalog systems), generating, 608-609 orphan pages, 82 OwnerInfo table (e-commerce catalog systems), 586

P Package Manager, 168 packages, downloading, 167-169 Page Properties command (Modify menu), 49 Page Properties dialog box, 49-50 page size estimation (document window), 14 pages. See Web pages palettes arranging, 30 Assets, 28 Library area, 159 resource icons, 165 Templates area, 163 Behaviors, 28, 110 Code Inspector, 29 CSS Styles, 29, 150 Data Bindings, 28, 265-266, 451, 540 design view bindings, 267-268 deselecting, 30 docking, 30 Frames, 29, 74-75 hiding, 30 History, 29

HTML Styles, 29, 148 Image Properties, Image Map tools, 62-63 Launcher, 28 Layers, 29, 71 Library, 29 Objects, 16-23, 333-334, 436 Character options, 17 Common options, 18-19 Form options, 20-21 Frame options, 21-22 Head Element options, 22-23 Invisible Elements options, 24 Master Detail object, 334-337 Record Insert Form object, 337-338 Record Update Form object, 338-340 Server Objects options, 24-25 Special Objects options, 25-26 Properties, 26-28 Property Inspector, tag attributes, 484 Reference, 29 Server Behaviors, 28, 232, 253, 435, 533, 540 Move To submenu, 263 Site Map, 28 Site, 28 Templates, 29 Timelines, 29, 129-131 undocking, 30 Windows menu, 28-30

primary keys

parameters adding to Go To Related Page behavior (message board systems), 466-468 connection string database configuration, 228 parent ID (message board systems), 470 partial update statements, 352 passing variables (session management), 409-414, 422 recordsets, 411 Show Region behavior, 412 user identifiers, 410 password fields, 312, 535-536 password function, 401 passwords connections, 228 troubleshooting, 232 login systems, 400-402 paths (timelines), 132-133 percentage matches, 525 Perl, 173 Perl add-on (ActiveState), 173 planning Web sites, 82-90 dynamic Web sites, 180-181 file naming conventions, 83-85 site maps, 82-83 site map tool, 85-90 plus sign (+), 435 PoisonTooth Web site, 209 pop-up browser windows, creating, 120-121

pop-up menus customized Web sites, 511-512 recordsets, binding to, 538 portal sites, 485-486 content page, 504-509 attributes, adding, 507-509 layer template, 509 recordsets, 505-507 cookies, 486 login system, 496-503 login pages, 500-503 registration pages, 496-499 preferences page, 510-514 deleting existing preferences, 513-514 hidden fields, 512 Insert Record behavior, 512-513 pop-up menus, 511-512 site map, 485-486 table definitions, 487-495 authentication, 487-488 content, creating, 492-494 default preferences, 495 features and options, 488-492 optimizing database structures, 490-492 user preferences, 487-488 positioning elements with layers, 68-69 grids, 14

753

images, 57-59 precise image positioning (tables), 57-58 rulers, 14 positioning attributes (styles), 157 POST method (variable passing), 175 PostgreSQL Web site, 363 preferences, 37-39 default preferences (customized Web sites), 495 Preview in Browser preferences, 39 user preferences customized Web sites, 487-488 tables, 528 preferences page (customized Web sites), 510-514 deleting existing preferences, 513-514 hidden fields, 512 Insert Record behavior, 512-513 pop-up menus, 511-512 Preferences window, 37-39 Preview in Browser preferences, 39 previewing Web sites, 50 Previous link e-commerce catalog systems, 594-595 message board systems, 463-464 primary keys, 350 defining, 191-192 multiple primary keys (server behaviors), 628

754

primary product table (catalog systems)

primary product table (catalog systems), 371-372 processing information in tables, 529 product catalog, 370-379 designing, 379-393 detail page, 388-390 related items, 390-391 search form, 380-383 search results page, 383-388 Show Region behavior, 391 primary product table, 371-372 related-item feature, 372-373 product category table, 371 queries, 375-379 searching product database, 375-377 showing related products, 377-379 Recordset Navigation Bar object, 394 Recordset Navigation Status object, 393-394 site map, 370 SQL, 374-375 product category table (catalog systems), 371, 584 product database (catalog systems), searching, 377 product table (e-commerce catalog systems), 584-585 profile.asp file, 538-540, 543 profiles, initial profiles (login systems), 532-534

programming languages, 200, 209-216 Active Server Pages (ASP), 201-202 basic concepts, 209-210 CFScript conditionals, 213-214 looping constructs, 213-214 variables, 211 ColdFusion, 204-205 conditionals, 213-214 dynamic elements, 215-216 looping constructs, 213-214 variables, 211 comments, 209 conditionals, 211-214 dynamic elements, 214-216 embedded programming languages, 201, 306 end of line, 209 Java conditionals, 212-213 dynamic elements, 215 looping constructs, 212-213 variables, 210-211 Java Server Pages (JSP), 202-204, 224 looping constructs, 211-214 tags, 209 variables, 210-211 VBScript conditionals, 212 dynamic elements, 214 looping constructs, 212 variables, 210

programs storing, 225 linkcheck program, 100 linking to databases, 224 properties drag layer action, 125-128 dynamic form elements, creating, 332-333 framesets, 73-75 table cells, 52-53 Properties palette, 26-28 property inspector, layers, 70 Property Inspector palette, tag attributes, 484 protecting Web pages, 543-544 protocols, HTTP protocol, 174

Q queries, 255 advanced queries, 364-366 complex queries, 627 configuring, 435 defining, 441 errors, 624-627 identical field names, 624-626 lengthy queries, 626 recordset queries, 322-323 catalog systems, 375-379 search query, setting up, 384-385 searching product database, 375-377 showing related products, 377-379

recordsets

defining manually, 435 editing, 541 login checking query (login systems), 404 searches complex, 518-523 responses, weighing, 525-526 thresholds, 523-525 session variables, 419 simple queries, 346 SQL banner ads, randomizing, 434-435 guestbooks, 445-447 images, seasonal/ time-based, 439-444 Web-page users, feedback, 445-447 sub-queries, 364 tag identifiers, 634 test, 232-233 query systems, 524-526 query variables, 256-257 querying database tables, 356-362 calculations, 359-360 group by function, 361-362 joining tables, 357-360 select command, 356 sorting information, 357 summarization functions, 360-362 question table (online testing systems), 550-551 Quick Tag Editor, 27 preferences, 39 Quick Tag Editor icon (Properties palette), 27

quiz form (online testing systems), 557-573 answer pop-up menu, 560-562 correct responses, measuring, 565-568 ending the quiz, 568-572 Move To Next Record behavior, adding, 559 protecting the quiz, 572-573, 576 recordset, 558 source code, 692-704 user response, saving, 562-565

R radio buttons, 317 message composition form, 478 radio buttons icon (Form palette), 21 rand() function, 434 randomized recordsets, 438 randomizing banner ads, 432-435 implementing, 435-437 sample data, 433-434 SQL queries, 434-435 table definitions, 432-433 reBanner recordset, binding images to image fields, 436 Record Insert Form object, 337-338 Record Update Form object, 338-340 recording commands, 166-167 paths, 132-133

755

records, 436 adding to databases, Insert Record behavior, 318-320 deleting, 325-326 detail screens, 321-325 advanced recordset queries, 322-323 filters, setting, 321-322 linking to, 326-329 testing with Live Data view, 324-325 variable passing types, 321-322 displaying, 451 sorting (database-driven screens), 301-302 update screens, 329-333 dynamic form elements, 331-333 Update Record behavior, 329-330 Recordset Navigation Bar object (catalog systems), 394 Recordset Navigation Status object (catalog systems), 393-394 recordsets, 255-257 binding to pop-up menus, 538 customized Web sites content page, 505-507 login pages, 501 database-driven screens front end databases, creating, 283 images, adding, 290-294

756

recordsets

e-commerce catalog systems final checkout page, 606-607 shopping cart view, 601-602 login systems login checking queries, 404 session management, 411 message board systems message deletion, 475 message listing, 462 message viewing page, 471-472 search function, adding, 468-469 sort capability, adding, 465-466 online testing systems administrative interface, 574 answer pop-up menu, 560-562 correct responses, measuring, 565-568 ending the quiz, 568-571 quiz form, 558 response table, 563 query variables, 256-257 randomized recordsets, 438 reBanner, binding images to image fields, 436 Update Profile page, 539 redefined HTML tags, 151 redirect behavior, 605 Reference palette, 29

refresh button, viewing randomized images, 437 refresh icon (Head Elements palette), 23 Refresh Local File List Automatically option, 42 refresh tag, 48 regions hiding, 276 repeat regions adding records to Web sites, 286-287 embedding, 277 register.asp file, 533 registration pages, 533-534 customized Web sites, 496-499 forms, creating, 496-498 hidden fields, adding, 497-498 Insert Record server behavior, 498 Request Variable data binding, adding, 497 username variable, detecting, 498-499 e-commerce catalog systems, 595-597 registration screen (login systems), 532-534 Registry Editor, 239 regular expressions (HTML editor search features), 35-36 related items (catalog systems), 390-391, 585 adding to detail screen, 593-594 related products (catalog systems), showing, 377-379

related-item feature (catalog systems), 372-373 relationships, 183 normalization, 188-189 relative positioning, 621-623 relative URLs, 43 renaming commands, 166 library items, 160 Repeat Region behavior, 286 repeat regions adding records to Web sites, 286-287 embedding, 277 REPLACE INTO statement, 259-260 Replace window (HTML editor), 33 reports, 280 Request Variable data binding, adding to registration page (customized Web sites), 497 reset buttons (forms), 314 reset() function (JavaScript), 316-317 resizing document window, 13 table cells, 52-53 resolution (document window), 13 resources, troubleshooting resources, 632-633 Restrict Access To Page behavior, 271-272, 572 restricted access (Web pages), 544 results of dynamic searches, 543

server behaviors

reusing code, 144-147 common components, 146-147 libraries, 146-147 server-side includes (SSI), 146 style sheets, 144-146 templates, 147 right icon (Frame palette), 22 RmiJdbc drivers, 234 installing, 235 as service, 239-240 starting, 238 rollover icon (Common palette), 18 rollover images, creating, 63-66 rollover navigation bars, creating, 66-67 rows (records), 436 rulers, 14

S saving site maps, 90 screens binding, 436 generating, 333-334 Master Detail object, 334-337 Record Insert Form object, 337-338 Record Update Form object, 338-340 login, 535-536 registration, 532 search, 540

scripts icon (Invisible Elements palette), 24 search and results pages, creating, 539-543 dynamic search results, 543 search expressions, creating, 353-354 search features (HTML editor), 33-36 actions, 34 Find In: attributes, 34 Find What section, 34 modifiers, 34-36 regular expressions, 35-36 search filters, setting (detail screens), 321-322 search forms (catalog systems), 380-383, 590-591 dynamic menus, 382-383 search function (message board systems), 468-470 search results page (catalog systems), 383-388, 591-592 linking to detail page, 389, 593 Move To behaviors, 386 search query, setting up, 384-385 using search results pages as a detail page, 388 search screens, 540 search.asp file, 536, 543 searching complex searches, 518-523 responses, weighing, 525-526 thresholds, 523-525 product database (catalog systems), 377

757

searchresults.asp file, 540, 543 seasonal images, 438-444 SQL queries, 439-444 table definitions, 439 second normal form (normalization), 189 Secure Sockets Layer (SSL), 420 security login systems, 420-421 online testing systems administrative pages, 575-576 quiz form, 572-573, 576 templates, 170 select command, 356 Select file from Datasource button, 436 selecting files (site map display), 88 layers, 69 objects (document window), 12-13 selection lists icon (Form palette), 21 serializing data structures, 176 Server Behavior Builder, 274 server behavior editor, 273-275 server behaviors, 253-266 adding to Update Profile page, 538-539 Behaviors palette, 28, 110 Check New Username, 534, 596 Command, 261 comparing to traditional databases, 262

758

server behaviors

creating, 273-275 Delete Record, 260-261, 325-326, 474-475, 604 Dynamic Element, 265-266 dynamic form elements, creating, 331-332 dynamic menus (catalog systems), 382-383 dynamic-element, 590 Go To Detail Page, 340, 593 Go To Related Page, 414-415 parameters, adding, 466-468 Hide Region catalog systems, 392-393 online testing systems, 568-569 Insert Record, 257-258, 318-320, 498, 512-513, 596, 599-600, 607-608 Log In User, 536, 555, 598 Move To, 263-264 search results page (catalog systems), 386-388 Move To Next Record (online testing systems), 559 Move To Specific Record, 592 problems, 623-629 advanced queries, 624-627 duplicate values, 631 embedded code, deleting, 624

embedded loops, 628-629 multiple primary keys, 628 recordsets, 255-257 redirect, 605 removing, 540 Repeat Region, 263, 286 Restrict Access To Page, 572 Server Behavior Builder, 274 server behavior editor, 273-275 ServerBehavior and Commands folder, 254 Show Region, 264-265, 405-407, 412, 464, 594-595 catalog systems, 391-393 Update Record, 258-260, 329-330 REPLACE INTO statement, 259-260 User Authentication behaviors, 270-273, 528, 535 Check New Username, 272-273 Log In User, 270-271 Log Out User, 272 Restrict Access To Page, 271-272 Validate Form, 630 Server Behaviors palette, 28, 232, 253, 435, 533, 540 Move To submenu, 263

Server Objects (Object palette), 333-334 Master Detail object, 334-337 Record Insert Form object, 337-338 Record Update Form object, 338-340 server operating systems, selecting, 205-209 performance/cost ratio, 207 reliability, 207 services, 206-207 support, 208 user friendliness, 206 server platforms, 200 Active Server Pages (ASP), 201-202 ColdFusion, 204-205 Java Server Pages (JSP), 202-204 server-side includes (SSI), code reuse, 146 server-side includes icon (Common palette), 19 ServerBehavior and Commands folder (Configuration directory), 254 servers accessing files, 90 Allaire JRun, 203 application, viewing files, 225 ColdFusion, logging in, 230 connections, 91-96, 252-253 direct connection, 91 file transfers, 96-98 FTP, 93-96

site maps

Local/Network connection, 92 SourceSafe database, 92 WebDAV, 92 iPlanet Web Server, 203 JDBC-ODBC, configuring, 236-239 MySQL, starting, 241 Oracle 8i Jserver, 203 RmiJdbc drivers, 239-240 starting, 238 Silverstream Application Server, 203 Tomcat, 203 WebSphere Application Server, 203 Services control panel, 240 servlets (Java), 202 session IDs, 176 e-commerce catalog systems, 580-581 session management (login systems), 408 session management, 174-178 cookies, 177-178 login systems, 408-415 cookies, 408-409, 415-419 Go To Related Page server behavior, 414-415 session IDs, 408 session variables, 416-419, 422 user identifiers, 408-410 variable passing, 409-414, 422

variable passing, 174-177 GET method, 175 POST method, 175 session variables, 175-177 session variables, 175-177, 416-419, 422 adding to login screen (online testing systems), 556 login pages (e-commerce catalog systems), 598 MM_Username, 537 setting, 417-418 in ColdFusion, 215 in Java, 215 in VBScript, 214 using in queries, 419 set text action, adding to status bar behavior, 115 setting CLASSPATH, 237-238 links, 54 MySQL, 240 for UNIX, 241-243 for Windows, 240-241 Shockwave icon (Common palette), 20 shopping cart (e-commerce catalog systems), 587, 599-601 shopping cart view (e-commerce catalog systems), 601-605 Delete Record behavior, 604 DeleteID radio button, 603 MM_recordId check, disabling, 604-605 recordsets, 601-602 redirect server behavior, 605

759

shortcuts (keyboard shortcuts), accessing Quick Tag Editor, 28 Show Region behavior, 264265, 405-407, 412, 594-595 catalog systems, 391-393 message board systems, 464 Silverstream Application Server, 203 simple queries, 346 single line fields (forms), 311 Site Files command (Windows menu), 43 Site FTP category command (Edit menu), 94 Site Map Layout option, 43 Site Map palette, 28 site map tool, 85-90 content pages, creating, 89 defining new sites, 89 file selection, 88 files, organizing, 90 icons, 86-87 layout, 89 links, 87-88, 90 saving a site map, 90 using on existing Web sites, 85-89 using on new Web sites, 89-90 Site Map view, 85 site maps, 82-83, 526 catalog systems, 370 customized Web sites, 485-486 e-commerce catalog systems, 582-584 file layout, 83 message board systems, 456-457 online testing system, 548 saving, 90

760

Site menu

Site menu Check Links Sitewide command, 99 New Site command, 42 Site palette, 28 Site preferences, 39 site window, 43 size limits, testing, 631 sizing document window, 13 table cells, 52-53 smallint data type, 661 sorting information in database tables, 357 message list (message board systems), 465-466 records (database-driven screens), 301-302 source code customized Web sites content page, 686-692 login page, 685-686 e-commerce catalog systems checkout page, 715-719 detail screen, 704-714 final checkout page, 719-727 guestbook, 669-672 message board systems main message listing page, 672-680 message viewing page, 680-684 quiz form (online testing systems), 692-704 unarchiving, 242 untarring, 242

SourceSafe database, 92 spell checking Web sites, 50-51 split icon (Frame palette), 22 splitting table cells, 58 SQL (Structured Query Language), 346-347 catalog systems, 374-375 create command, 348 database objects, 347 databases, 347 adding data, 352 creating, 348-349 data types, 350-351 delete command, 355-356 designing, 193-194 INSERT command, 351-352 not null modifier attribute, 350 primary keys, 350 update command, 352-355 delete command, 355-356 drop command, 349-351 INSERT command, 351-352 login systems, 399-402 message board systems, 457-460 online testing systems, 549-554 data, adding, 551 question table, 550-551 user response table, 552-554 username and password table, 549 users, adding, 552

queries advanced queries, 364-366 banner ads, randomizing, 434-435 feedback (Web page users), 444-447 guestbooks, 444-447 images, seasonal/ time-based, 439-444 sub-queries, 364 select command, 356 stored procedures, 347, 363 tables, 347 creating, 349 deleting, 351 joining, 357-360 querying, 356-362 sorting information, 357 summarization functions, 360-362 update command, 352-355 where clause, 353-354 views, 347, 363 SRVANY.EXE , 239 SSI (server-side includes), code reuse, 146 SSL (Secure Sockets Layer), 420 starting servers MySQL, 241 RmiJdbc, 238 Startup button, 240 statements, REPLACE INTO, 259-260 static Web pages, dynamic transitioning, 430-432 status bar behavior, creating, 115-118 Status Bar preferences, 39

table definitions

stored procedures, 347, 363 storing applications, 225 fields in comment table, 445 images, 444 messages in comment table, 445 string comparison functions, 664 string functions, 665-667 Structured Query Language. See SQL style sheets, 108 code reuse, 144-146 CSS (Cascading Style Sheets), 144-146, 149-158 background attributes, 155 block attributes, 155-156 border attributes, 156 box attributes, 156 extensions attributes, 157 external style sheets, 153-154 list attributes, 156-157 positioning attributes, 157 styles, applying, 152-153 styles, creating, 150-152 Type attributes, 155 external style sheets, 153-154 master style sheets, 169

styles applying, 152-153 background attributes, 155 block attributes, 155-156 border attributes, 156 box attributes, 156 creating, 150-152 CSS Selector, 151 custom styles, 151 extensions attributes, 157 HTML styles, 147-149 list attributes, 156-157 positioning attributes, 157 redefined HTML tags, 151 type attributes, 155 sub-queries, 364 subdividing frames, 75 submit buttons (forms), 313-317 image buttons, 315-316 JavaScript, 316-317 naming, 314 reset buttons, 314 submit() function (JavaScript), 316-317 sum() function, 361 summarization functions, 360-362 GROUP BY classes, 668 Sun Web site, 237 survey systems, 548-576 administrative interface, 573-576 login screen, 554-556 quiz form, 557-573 answer pop-up menu, 560-562 correct responses, measuring, 565-568 ending the quiz, 568-572

761

Move To Next Record behavior, adding, 559 protecting the quiz, 572-573, 576 recordset, 558 source code, 692-704 user response, saving, 562-565 site map, 548 SQL database, 549-554 data, adding, 551 question table, 550-551 user response table, 552-554 username and password table, 549 users, adding, 552 synchronization (file transfers), 98 syntax, connection string database configuration, 229 system color pickers, 53 systems login, 532 error messages, 536 initial profiles, 532-534 registrations, 532-534 query, 524-526

T table definitions, 526 banner ads, randomizing, 432-433 customized Web sites, 487-495 authentication, 487-488 content, creating, 492-494

762

table definitions

default preferences, 495 features and options, 488-492 optimizing database structures, 490-492 user preferences, 487-488 e-commerce catalog systems, 584-589 catalog items, 584-585 product categories, 584 related items, 585 shopping cart information, 587 user information, 585-586 feedback (Web page users), 444-445 guestbooks, 444-445 images, seasonal/ time-based, 439 Options table, 528-529 sample data, inserting, 530-532 UserInfo table, 527-528 table icon (Common palette), 18 tables, 51-61, 347 banner, 433 cellpadding attribute, 52 cells colors, setting, 53 joining, 58 resizing, 52-53 splitting, 58 comment fields, storing, 445 comment messages, storing, 445 converting to layers, 71-72 creating, 349

database-driven screens, 280-290 backend database, creating, 280-282 data, adding, 284 data layout, 288-290 front end database, creating, 282-290 live data previews, 284-285 multiple records, displaying, 286-287 recordsets, setting up, 283 definitions. See table definitions deleting, 351 HTML design errors, 614-617 images aligning text and images, 56, 79 inserting, 55 positioning, 57-59 precise image positioning, 58 incomplete tables, 617 information processing, 529 inserting, 51 joining, 357-360 calculations, 359-360 layout mode, 59-61 layout tables, 60 links, setting, 54 nesting, 58 option fields, naming, 529 Options, 528-529 order information table (e-commerce catalog systems), 586-587

primary product table (catalog systems), 371-372 product category table (catalog systems), 371, 584 product table (e-commerce catalog systems), 584-585 properties, 52-53 querying, 356-362 calculations, 359-360 group by function, 361-362 joining tables, 357-360 select command, 356 sorting information, 357 summarization functions, 360-362 question table (online testing systems), 550-551 records, 436 displaying, 451 sample data, inserting, 530-532 sorting information, 357 summarization functions, 360-362 tblCart table (e-commerce catalog systems), updating, 608-609 text attributes, 54-55 user preferences, 528 user response table (online testing systems), 552-554 UserInfo, 527-528 e-commerce catalog systems, 585-586 username and password table (online testing systems), 549

tinyint data type

tabular data icon (Common palette), 19 tag identifiers (queries), 634 tags attributes, setting dynamically, 484 end tags, missing end tags, 616 FORM tags, missing FORM tags, 618-619 tag, 47 highlighted tags, 617 keywords metatags, 79 layer tag, 67 <META> tag, 47 programming concept, 209 referencing tag information (HTML editor), 33 refresh tag, 48 <TITLE> tag, 47 tblCart table (e-commerce catalog systems), updating, 608-609 tblUserInfo fields, 533 templates, 161-164 applying content of existing files, 164 Assets palette, 163 code reuse, 147 creating from existing pages, 161-163 from scratch, 163-164 detaching from Web pages, 164 layer template (customized Web sites), 509 restrictions, removing from files, 164 security, 170 updating, 164

Templates palette, 29 temporary commands, recording, 167 Test button, 231 test queries, 232-233 testing, 629-632 connections, 231-233 detail screens with Live Data view, 324-325 duplicate values, 631 empty (null) values, 629-631 login systems, 406 MySQL, 243-244 size limits, 631 testing systems, 548-576 administrative interface, 573-576 login screen, 554-556 quiz form, 557-573 answer pop-up menu, 560-562 correct responses, measuring, 565-568 ending the quiz, 568-572 Move To Next record behavior, adding, 559 protecting the quiz, 572-573, 576 recordset, 558 source code, 692-704 user response, saving, 562-565 site map, 548 SQL database, 549-554 data, adding, 551 question table, 550-551 user response table, 552-554 username and password table, 549 users, adding, 552

763

text Flash text, adding, 135-136 HTML styles, 147-149 text attributes, 54-55 text data type, 663 Text Field tool, 311-312 text fields, 310-313 Char Width attribute, 312 Init Val attribute, 313 Max Chars attribute, 313 multiline, 311, 448 naming, 312 Num Lines attribute, 313 password fields, 312 single line fields, 311 Wrap attribute, 313 text fields icon (Form palette), 20 text links, 61 textareas, 448 third normal form (normalization), 190 thresholds (complex searches), 523-525 time and date functions, 667-668 time-based images, 438-439, 442-444 SQL queries, 439-444 table definitions, 439 timelines, 128-134 frames, 129 keyframes, 131 paths, 132-133 timeline pop-up menu functions, 133-134 Timelines palette, 29, 129-131 timestamp data type, 662 tinyblob data type, 663 tinyint data type, 661

764

tinytext data type

tinytext data type, 663 <TITLE> tag, 47 Tomcat, 203 Tool palette, 17 tooltips, creating, 118-120 top icon (Frame palette), 22 top left icon (Frame palette), 22 tracing images, 15, 69 transferring files, 95 troubleshooting connections, 232 JDBC drivers, 236 type attributes (styles), 155 Type definition screen, 151

U UltraDev authentication system, 420 DSN connections, 228 environment, customizing, 655-660 extending, 166-169 packages, downloading, 167-169 recording commands, 166-167 interface, 8-9 document window, 11-15 HTML editor, 31-36 menu system, 9-10 Objects palette, 16-23 Properties palette, 26-28 Windows menu, 28-30 Macintosh OS, 228 preferences, 37-39

unarchiving source code, 242 undocking palettes, 30 Uniform Resource Locators (URLs), 43 unique identifiers, 182-183 UNIX comparing to Windows NT, 205-209 performance/cost ratio, 207 reliability, 207 services, 206-207 support, 208 user friendliness, 206 MySQL, 241-243 untarring source code, 242 update command, 352-355 WHERE clause, 353-354 update page, linking to master listing page, 340-341 Update Profile page creating, 537-539 recordsets, 539 server behaviors, adding, 538-539 Update Record behavior, 258-260, 329-330 REPLACE INTO statement, 259-260 update screens, 329-333 dynamic form elements, 331-333 Update Record behavior, 329-330 updating data in databases, 352-355 library items, 160 templates, 164 Web pages, 160

UPPER function, 377 URL parameter passing (session management), 409-414, 422 recordsets, 411 Show Region server behavior, 412 user identifiers, 410 URLs (Uniform Resource Locators), 43 user accounts (e-commerce catalog systems), 581-582 User Authentication behaviors, 270-273, 528, 535 Check New Username behavior, 272-273 Log In User behavior, 270-271 Log Out User behavior, 272 Restrict Access To Page behavior, 271-272 user authentication system (e-commerce site), 595-598 Check New Username behavior, 596 Insert Record behavior, 596 Log In User behavior, 598 login pages, 597-598 registration page, 595-597 user feedback (Web pages), 444-447 user identifiers, session management (login systems), 408-410 user information (e-commerce catalog systems), 585-586 user logins, 398-421 HTTP authentication, 398 login checking query, 404 login screen, 402-404

Web pages

passwords, 400-402 security, 420-421 session management, 408-415 cookies, 408-409, 415-419 Go To Related Page server behavior, 414-415 session IDs, 408 user identifiers, 408-410 variable passing, 409-414, 422 Show Region behavior, 405-407 SQL, 399-402 testing, 406 verification screen, 404-406 Web-based logins, 398-399 user preferences customized Web sites, 487-488 tables, 528 user response table (online testing systems), 552-554 UserInfo table, 527-528 e-commerce catalog systems, 585-586 username and password table (online testing systems), 549 username fields, 536 checking, 534 username variable (customized Web sites), detecting, 498-499 usernames connections, 228 troubleshooting, 232

duplicate, 534 login screens, 535 user authentication behaviors, 535 Using Red Hat Linux, 243

V valid logins (customized Web sites), 501-503 Validate Form behavior, 630 values duplicate values, testing, 631 empty (null) values, testing, 629-631 not null values, testing, 629-631 varchar() datatype, 350, 662 variable passing, 174-177 GET method, 175 POST method, 175 session management (login systems), 409-414, 422 recordsets, 411 Show Region behavior, 412 user identifiers, 410 session variables, 175-177 variable passing types, 321322 variables, 210-211 CFScript, 211 ColdFusion, 211 Java, 210-211 MM_Username session, 537 query variables, 256-257

765

session variables, adding to login screen (online testing systems), 556 username variable (customized Web sites), detecting, 498-499 VBScript conditionals, 212 dynamic elements, 214 looping constructs, 212 variables, 210 verification screen (login systems), 404-406 verifying links, 99-100 View menu, Live Data command, 285 viewing files (application server), 225 views, 347, 363 Asset manager, 165

W Web browsers checking code, 77 cookies, 177-178 configuring Web browsers, 417 Internet Explorer. See Internet Explorer Netscape Navigator. See Netscape Navigator pop-up browser windows, 120-121 Web pages. See also Web sites attributes, 49-50 banner ads implementing, 435-437 randomizing, 432, 435 sample data, 433-434

766

Web pages

SQL queries, 434-435 table definitions, 432-433 detaching from templates, 164 dynamic HTML, creating, 447-451 images, 438-444 transitioning from static Web sites, 430-432 user feedback, 444-447 guestbooks HTML, creating, 447-451 SQL queries, 445-447 table definitions, 444-445 user feedback, 444 HTML, creating, 447-451 images, 438-444 protecting, 543-544 registration, 533-534 restricted access, 544 search and results page, creating, 539-543 simple pages, creating, 45-46 static, dynamic transitioning, 430-432 templates, creating from existing pages, 161-163 Update Profile creating, 537-539 recordsets, 539 server behaviors, adding, 538-539 user feedback, 444-447 SQL queries, 445-447 table definitions, 444-445

Web safe colors, 54 Web sites. See also Web pages Allaire, 203, 633 Apple, 235 ASPFree.com, 633 author’s Web site, 173 BlooBerry, 632 Chili!Soft, 201 cross-platform Web sites, font problems, 144-146 customized Web sites. See customized Web sites defining, 42-44 site map tool, 89 designing, 44-45 DevEdge Online, 114 dynamic Web sites, 172-181, 225 CGIs (Common Gateway Interfaces), 172-173 cookies, 177-178 creating, 179-181 database design. See database design designing, 485 embedded HTML languages, 173 planning, 180-181 types, 179 variable passing, 174-177 files, accessing, 90 framesets, 72-76 defining, 73-74 embedding multiple framesets, 76 Frames palette, 74-75 “get out of frames” link, creating, 79

limitations, 76 NoFrames Content, 75 properties, 73-75 subdividing frames, 75 Gamelan, 137 GNOME, 206 Great Bridge, 206 head elements, editing, 47-48 IBM Software, 203 iPlanet, 203 Jakarta Project, 203 java.sun.com, 203 JSPtags, 632 KDE, 206 layers, 67-72, 79 adding, 69 attributes, 70 converting to tables, 71-72 positioning elements, 68-69 preventing layer overlaps, 71 selecting, 69 viewing with Layers palette, 71 links broken links, fixing, 100 creating, 46-47 verifying, 99-100 location, setting, 42 Macromedia, downloading UltraDev packages, 167-169 maintaining, 99-100 Microsoft Scripting Technologies, 114 MySQL, 632, 661

YEAR data type

navigation features, 61-67 image maps, creating, 61-63 JavaScript elements, limitations of, 67 lists of links, 61 rollover images, creating, 63-66 rollover navigation bars, creating, 66-67 Netcraft, 207 Object Web, 234 Oracle, 203 page attributes, 49-50 planning, 82-90 file naming conventions, 83-85 orphan pages, 82 site map tool, 85-90 site maps, 82-83 PoisonTooth, 209 portal sites. See portal sites PostgreSQL, 363 previewing, 50 server connections, 91-96, 252-253 direct connection, 91 file transfers, 96-98 FTP, 93-96 Local/Network connection, 92 SourceSafe database, 92 WebDAV, 92 Silverstream, 203 simple pages, creating, 45-46 spell checking, 50-51 Sun, 237

tables, 51-61 aligning text and images, 56, 79 cellpadding attribute, 52 colors, setting, 53 converting to layers, 71-72 images, inserting, 55 images, positioning, 57-59 inserting, 51 layout cells, 60 layout mode, 59-61 layout tables, 60 links, setting, 54 nesting, 58 positioning images, 57-59 properties, 52-53 resizing table cells, 52-53 text attributes, 54-55 Web-based logins, 398-399 WebDAV, 92 WebSphere Application Server, 203 WebTV, 13 WEEK() function, 440 weighing responses (complex searches), 525-526 WHERE clause, 523 calculation of difference, 524 update command, 353-354 Window menu, Site Files command, 43 windows Code Inspector window, 32-33 customizing, 657-660 data binding window, 266-267

767

document window, 11-15 customizing, 14-15 design size, 13 download/page size time estimation, 14 grids, 14 resizing, 13 rulers, 14 selecting objects, 12-13 tracing images, 15 pop-up browser windows, 120-121 Preferences window, 3739 Replace window (HTML editor), 33 site window, 43 Windows fonts, 144-146 MySQL, 240-241 Windows menu, 28-30 Windows NT, comparing to UNIX, 205-209 wrap attribute (form fields), 313 WYSIWYG interface, 11

X-Y-Z XHTML, 45 XML (Extensible Markup Language), 45

YEAR data type, 662

Installation Instructions Windows 95/98/2000 NT 4 Installation Instructions 1. Insert the CD-ROM into your CD-ROM drive. 2. From the Windows desktop, double-click on the My Computer icon. 3. Double-click on the icon representing your CD-ROM drive. 4. Double-click on the icon titled START.EXE to run the installation program. 5. Installation creates a program group named “TYDreamUltraDev”. This group will contain icons to browse the CD-ROM.

Note

If you have the AutoPlay feature enabled, the Start.exe program starts automatically whenever you insert the disc into your CD-ROM drive.

Macintosh Installation Instructions 1. Insert the CD-ROM into your CD-ROM drive. 2. When an icon for the CD appears on your desktop, open the disc by double-clicking on its icon. 3. Double-click on the icon named START and follow the directions that appear.

By opening this package, you are agreeing to be bound by the following agreement: You may not copy or redistribute the entire CD-ROM as a whole. Copying and redistribution of individual software programs on the CD-ROM is governed by terms set by individual copyright holders. The installer and code from the author(s) are copyrighted by the publisher and the author(s). Individual programs and other items on the CD-ROM are copyrighted or are under GNU license by their various authors or other copyright holders. This software is sold “as is” without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and fitness for a particular purpose. Neither the publisher nor its dealers or distributors assumes any liability for any alleged or actual damages arising from the use of this program. (Some states do not allow for the exclusion of implied warranties, so the exclusion may not apply to you.)

Note

This CD-ROM uses long and mixed-case filenames requiring the use of a protected-mode CD-ROM driver.

Recommend Documents

Michiel van Otegem Teach Yourself XSLT in 21 Days 800 East 96th St., Indianapolis, Indiana, 46240 USA Sams Teach ...

Michiel van Otegem Teach Yourself XSLT in 21 Days 800 East 96th St., Indianapolis, Indiana, 46240 USA Sams Teach ...

Contents i What’s New with This Edition Teach Yourself ANSI C++ in 21 Days, Premier Edition, is a new edition of the i...

ITKnowledge home account info subscribe login search site FAQ/help map contact us To access the contents, click ...

Charles Mohnike Teach Yourself ColdFusion MX ® in 21 Days 800 East 96th St., Indianapolis, Indiana, 46240 USA Sa...

Andrew Watt and Jonathan Watt with Jinjer Simon and Jim O’Donnell Teach Yourself JavaScript in 21 Days 800 East 96t...

Sams Teach Yourself EJB in 21 Days ASSOCIATE PUBLISHER Copyright © 2003 by Sams Publishing DEVELOPMENT EDITOR All r...

Teach Yourself C++ in 21 Days, Second Edition Introduction Week 1 at a Glance Day 1 Getting Started Day 2 The Parts of ...

Bradley L. Jones Teach Yourself C# in 21 Days SECOND EDITION 800 East 96th St., Indianapolis, Indiana, 46240 USA...