Graphics Programs Reference
In-Depth Information
12. In the Server Behaviors panel, add the Insert Record behavior, select moeb_connect
as the connection, click blog in the Insert into table list, click the Browse button, click
the about.html page in the local root folder, click the OK button, click blogentry in the
Get values from list, if necessary, click blog in the Column list, click blogentry inserts
into column “blog” (Text) in the Form elements list, and then click the OK button. The
Insert Record behavior is added to the page and appears in the Server Behaviors panel.
13. Save the page, upload the page to your remote server (include dependent fi les), pre-
view the page in a browser, and then close the browser.
14. Open the about.html page in Design view, click the document type link in the
Server Behaviors panel, select ASP VBScript in the list, click the OK button, click the
Update button to update the links in the pages, click the OK button in the message
dialog box, and then update the link in the navigation text in the about.asp page so
that the link goes to the about.asp page when clicked.
15. Click the blog.asp tab, save the page, right-click the Recordset behavior in the Server
Behaviors panel, click Copy on the context menu, click the about.asp tab, right-click
in the Server Behaviors panel, and then click Paste on the context menu to paste the
Recordset behavior into the page.
16. Double-click the Recordset behavior in the Server Behaviors panel to open the
Recordset dialog box, select blog from the blog table in the Database items list, click
the SELECT button, and then click the OK button.
17. Delete the text below the heading in the content div, click the Dynamic Table but-
ton in the Dynamic Data list in the Data category of the Insert panel, click the All
records button, set the border to 0, set the cell padding to 3, and then click the
OK button.
18. Save the page, upload the about.asp page and the blog.asp page to your remote
server (include dependent fi les), preview the blog.asp page in a browser (updating
the page and dependent fi les on the testing server, if necessary), click the Submit
button to test that the Spry Validation Textarea widget is working (a message appears,
stating that “A value is required.”), type a test entry in the form, and then click the
Submit button to submit the form. The about.asp page with the new entry opens in
the browser window. ( Hint : If you are sharing a database with classmates, you might
see additional entries in the database.)
19. Submit the fi nished fi les to your instructor.
Case Problem 2
Add database-
driven pages
to collect and
display a tally
of visitors' votes
for favorite
paintings in an
educational Web
site featuring the
work of Charles
Russell.
Data File needed for this Case Problem: cowboy_db.sql or cowboy_db.mdb
Cowboy Art Society Moni wants visitors to the Cowboy Art Society site to vote for their
favorite painting. You will create a form in the home page so that visitors can vote for
a painting. The form will be connected to a database that stores the votes, and the vote
tally will be displayed below the form in the home page.
If you are using MySQL and PHP on a Linux server, complete the following steps:
1. Open the Cowboy Charlie site you modifi ed in Tutorial 8, and then open the
index.html page in Design view.
2. After the existing content in the content div, insert a form into the page, enter
voteform as the form name, and then, in the form, insert a table with 3 rows, 1 col-
umn, 40 percent table width, 0 border thickness, 2 cell padding, 2 cell spacing, and
no header cells.
3. In the top row, type Select your favorite painting , and then align the text to the Left
and Top.
Search WWH ::




Custom Search