First Guide to SQL Anywhere Studio
PART 2. Getting Results with SQL Anywhere Studio
CHAPTER 10. Building a Dynamic Web Site with PowerDynamo
You can make changes in the template from within Sybase Central and view the results from the open Web browser. When you change the template, you will save the changes to the database. Then, you will reload or refresh the document in the Web browser to view the changed document.
This project involves the following tasks:
Refine the formatting and the query
Save changes to the database and reload the URL
You may not be happy with the default HTML formatting inserted by PowerDynamo for the table. To change formatting, you can refine the code as desired. In this task, you will delete the border from the table and change the heading.
PowerDynamo's code editor displays coding of different types in specific colors. You can use this feature to avoid typographical errors that cause problems in script interpretation.
Double-click Employees.stm in the Sybase Central window.
The text of the template appears in the code editor.
The text delimited by the HTML tags <H1> and </H1> is a top-level, or level-1, heading. Change this text to "Employee Contact Information by Department".
Delete the word BORDER and the space preceding it from the <TABLE BORDER> tag so that it reads <TABLE>.
Place the cursor below the </H1> tag and add the following lines:
<P>For changes to the Employee information please contact the Human Resources departments.</P>
The Employees.stm template should now look like this:
Once you have made changes to a template or script you need to save it so that you can view the changes in your Web browser. Once the template or script has been saved you can view the changes in a Web browser by reloading the document.
Choose File->Save to Database or click the database icon to save the Employees.stm template.
Close Employees.stm.
Reload or refresh the document in the Web browser.
In Netscape Navigator, you reload a document by clicking the Reload button or choosing View->Reload.
In Internet Explorer, you refresh a document by clicking the Refresh button.
The document appears with the changes you just made. You may modify any content within a template or scripts in this way, including:
DynaScript
JavaScript
SQL
tags (HTML tags and PowerDynamo tags)
Comments
If you get a script or SQL error message, fix the error in the template, save the changes to the database, and reload the URL in the Web browser.