When the solution matters

Tips...

4D v11 SQL4D 2004 (previous version) Solution Accelerators Academic Downloads

Solution Accelerators

4D Meetings

How-Do-I? Example Databases

Web Serving

For these databases, the password for the Designer user is: "designer", and the password for the Administrator user is: "admin". The Web Serving example databases are meant to be gone through in order as each one builds on the previous example. The last example, "All Web Serving Demos and Examples", combines all the previous Web serving examples into one database.

Title Description Download See Also
1. Starting or Stopping the Web Server This database will show how to programmatically set the port number and enable your database for basic Web serving. This demo will only serve static pages that are located on your hard drive. With the Web server running, point your Web browser at the IP address of the computer running this demo to see the basic web page that is returned. Win | Mac
2. OnWebAuthenticate When the "Use Passwords" preference is checked, the Database Method "OnWebAuthentication" is run every time a Web request is handled by 4D (with a few exceptions). This example explains how this is handled using 4D's built in Web server. Win | Mac
3. OnWebConnection This database will show how to handle web serving using the Web server built into 4D. The Database Method "OnWebConnection" is run whenever the Web server receives a request with the URL path beginning with 4DCGI or receives an invalid request. Win | Mac
4. Passing Parameters Typically any data passed after the "?" in a URL is considered a parameter(s). It's up to the developer to parse the data in the parameter(s) in order to use it. You can use the parameters to pass search parameters, record IDs, or additional commands to your 4D Methods that run when the Web page is served. Win | Mac
5. 4DINCLUDE Tag Using the 4DINCLUDE tag in your web pages allows you to include standard headers or footers (or any other section of content) within your Web pages. These HTML pages can include 4D Web commands or 4D commands as shown in this example. Win | Mac  
6. Unique URLs Most Web browsers will try to load a page from it's cache to speed up the download process. This is ok when you have static pages but if you are serving dynamic data the cached version may not be up to date. By appending a unique value to each URL we can make sure that the data displayed is always current. This example also shows a simple example of using 4DVAR tags. Win | Mac
7. 4DSCRIPT Tag Using the 4DSCRIPT tag allows you to run 4D methods or commands from within your Web page. These methods or commands can be used to query a table, load a specific record, or any other action that may be needed for your web page to work correctly. Win | Mac
8. Web Forms This example shows how to display a list of records, search for a record, add, modify and delete records using Web forms. When deleting a record, a confirmation page is shown. Win | Mac
9. All Web Serving Demos and Examples This database is a summary of all the Web Serving databases in this series. Win | Mac  

International | Company | Contact 4D | Site Map | Privacy Policy | © 4D, Inc. 1995-2008 | Change font size: [A] [A] [A] | Print this page | 4D RSS Feeds