Corel Paradox Internet tools basic tasks

The Corel Paradox Internet tools allow you to harness the power of the Internet with a few simple steps. (Use the Corel Web Server (.EXE) for simple, straightforward Web publishing. Use the Corel Web Server Control if you want to program the server to send custom responses to browser requests or process information posted by electronic forms.)

Step 1: Creating and working with HTML documents

You can easily publish reports and tables to the Internet using the Corel Paradox HTML Publishing Experts to translate them into HTML. You can also create static HTML documents from Paradox forms. For more information, see the following topics:

· Publishing reports to HTML
· Publishing tables to HTML
· Publishing forms to HTML

Step 2: Preparing to use the Corel Web Servers

You must have a TCP/IP network connection for the Corel Web Servers to function properly. To install the TCP/IP protocol on your system please consult your Windows documentation.

You must also have an properly configured Web server running on your system in order to receive and process browser requests.

· Setting up the Web server
· Setting Web server properties

Step 3: The Web server in action

· Starting the Web server
· Testing the Web server
· Viewing Web server connections

For more detailed help please consult the Paradox online help.


Publishing reports to HTML

The Corel Paradox HTML Report Expert easily translates any Corel Paradox report to an HTML file, allowing you to choose from a number of publishing options as you go.

To publish a report to HTML

1. View the report.
2. Click File, Publish to HTML.
3. Follow the steps in the HTML Report Expert.

Note

· The Corel Web Servers are case-sensitive, so make sure you note the exact filename used when saving documents for future reference.


Publishing tables to HTML

The Corel Paradox HTML Table Expert easily translates any Corel Paradox table to an HTML file, allowing you to choose from a number of publishing options as you go.

To publish a table to HTML

1. View the table.
2. Click File, Publish to HTML.
3. Follow the steps in the HTML Table Expert.

Note

· The Corel Web Servers are case-sensitive, so make sure you note the exact filename used when saving documents for future reference.


Publishing forms to HTML

You can publish a Corel Paradox form to a static HTML document. This feature works best with simple forms that use text, edit boxes, list boxes, radio buttons or check boxes. Form objects such as graphics, table frames, crosstabs, notebooks and charts do not translate statically to HTML.

To publish a form to an HTML file

1. View the form.
2. Click File, Publish to HTML.
3. Type a filename.
4. Choose .HTM as the file type from the drop-down list.
5. Click the Save button.

Corel Paradox saves an HTML version of your form that can be viewed by a Web browser.

Note

· Corel Paradox automatically adds FORM METHOD and ACTION tags to any form published to HTML. By default the FORM METHOD tag is set to POST and the ACTION is set to the Paradox form name. To set these properties yourself, change the HTMLMethod property or the HTMLAction property of the form using the Object Explorer.
· Paradox also adds a Submit button to static forms published to HTML. For the Submit button to work with the Corel Web Server Control, you must add code to trap the POST action in the OnPostRequest event. For more information, see Processing information from HTML input forms.

· The Corel Web Servers are case-sensitive, so make sure you note the exact filename used when saving documents for future reference.


Processing information from HTML input forms

You can configure the Corel Web Server Control to trap information submitted by HTML input forms in its OnPostRequest event. This example uses an HTML input form named SIMPLEFORM.HTM with the following characteristics:


<HTML>
<HEAD>
<TITLE>Simple Input Form</TITLE>
</HEAD>

<H1 ALIGN=CENTER><B>Enter Your Name</B></H1>
<P><HR></P>

<P><FORM ACTION="FormData1" METHOD="POST">
<B>Name:</B><BR>
<INPUT NAME="Name"></P>

<P><INPUT TYPE="SUBMIT" VALUE="Submit"></FORM></P>

</BODY>
</HTML>

You can cut and paste the above text into an HTML file to try the following example.

To trap information posted by an HTML input form

1. Design the Corel Paradox form containing the Corel Web Server Control object.
2. Set the Base Path of the Corel Web Server Control to the form SIMPLEFORM.HTM on the Pages page in the Corel Web Server Control Properties dialog box.
3. Right-click the Corel Web Server Control object and click Object Explorer.
4. Click the Event tab.
5. Double-click the OnPostRequest event to open the Editor window.
6. Add the following code:


method OnPostRequest(Request OleAuto, Response OleAuto)
var
vname string
endvar
if request.URI="/FormData1" then
vname=request.getfield("Name")

Response.ResultString = string(
"<HTML><H1>Thank You ", vname, "!</H1></HTML>" )
endif
endMethod

You can request SIMPLEFORM.HTM from the Corel Web Server Control using your browser. When you click the Submit button, the Corel Web Server Control is prepared to process the information you have typed in the form.

Note

· Create HTML input forms by using File, Publish to HTML in Corel Paradox or using an HTML editor such as Corel Web Designer.


Setting up the Web server

The Corel Web Server (.EXE) and related documentation are included when you install Corel Paradox. The Setup program also copies the Corel Web Server Control (WEBSRV.OCX) and supporting DLLs into appropriate directories and registers them.

To set up the Corel Web Server (.EXE)

· Choose Corel Web Server from the Start menu (by default, it is placed in the Accessories submenu of the Corel Paradox 8 program group). The Corel Web Server icon will appear on the Taskbar. It is active and ready to receive browser requests.

For help using the Corel Web Server, right-click the Corel Web Server icon and click View connections to maximize the Web server window. Choose Help Topics from the Help menu to open the Corel Web Server (.EXE) Help file.

To set up the Corel Web Server Control

· Place a Corel Web Server Control object on a Corel Paradox form. For more information, see the following topics:

· Adding the Corel Web Server Control Toolbar button
· Adding the Corel Web Server Control to a form


Adding the Corel Web Server Control button to the toolbar

To add the Corel Web Server Control button to the toolbar

1. Create a new blank form or open an existing form in Design mode.
2. Click View, Toolbars and enable the Object check box.
3. Right-click within the Object toolbar in a blank area and click Add ActiveX Control.
4. Choose Corel Web Server Control in the Insert Control dialog box.

When you click the OK button, this button appears on the ActiveX Controls tab of the Object toolbar and the alternate ActiveX Controls view of the Standard toolbar.


Adding the Corel Web Server Control to a form

To add the Corel Web Server Control to a form

1. Open a form in the Form Design window.
2. Click the Corel Web Server Control button on the Object toolbar.
3. Click and drag to draw the Corel Web Server Control window.


Setting Web server properties

You can set properties for the Corel Web Servers using the appropriate Web server Properties dialog box. The Base Path and Default Page properties on the Web server Properties dialog box Pages page must be set for the Web server to function properly.

To set Corel Web Server (.EXE) properties

· Right-click the Corel Web Server icon on the Taskbar and click Properties to open the Web server Properties dialog box.

For more information about Corel Web Server properties, see the Corel Web Server (.EXE) Help file.

To set Corel Web Server Control properties

· Right-click the Corel Web Server Control object and choose Properties… Corel Web Server Control to open the Web server Properties dialog box.

For more information about Corel Web Server Control properties, see About Corel Web Server Control properties.


About Corel Web Server Control properties

To set Corel Web Server Control properties, right-click the Corel Web Server Control and click Properties, Corel Web Server Control.
In the Corel Web Server Control Properties dialog box, click a tab to set each kind of property:

· Server properties
· Pages properties
· Logging properties
· MIME properties
· Events properties
· Status properties

There are other properties not available on these pages that you can only set with ObjectPAL code. Please consult the Paradox online help for more details.


Starting the Web server

The Web server must be active in order to process requests from browsers. The Corel Web Server (.EXE) is launched in an active state, however, it can be shut down without exiting the server.

To start the Corel Web Server (.EXE)

· If the Corel Web Server (.EXE) has been shut down, you can either click the Startup/Shutdown toggle toolbar button, or right-click the Corel Web Server icon on the Taskbar and click Startup.

To start the Corel Web Server Control

· Run a form containing a Corel Web Server Control object.

When you start the Corel Web Server Control, you have a fully functional Web server that can retrieve static HTML documents and graphics.


Testing the Web Server

You can test the Corel Web Server (.EXE) or the Corel Web Server Control using your machine as both the client and the server.

To test the Web server

1. Launch your Web browser.
2. Type your computer name as the address to locate.

If you don’t know your computer name, consult your Windows documentation.

The page you specified in the Web server Base Path property will be displayed by the browser.

Note

· The Corel Web Servers are case-sensitive. Be sure to use the exact same filename you specified in the HTML Publishing Expert.


Viewing Web server connections

Browser requests are displayed in the Corel Web Server (.EXE) window and in the Corel Web Server Control object on a form.

To view connections to the Corel Web Server (.EXE)

· Maximize the Corel Web Server window by right-clicking the Corel Web Server icon on the Taskbar and clicking View Connections.

To view connections to the Corel Web Server Control

· View the Corel Paradox form containing the Corel Web Server Control object.