When the solution matters

Tips...

Registration Documentation Knowledgebase Seminars / Training Partner Programs 4D Partner Central

Hello World

Now, let's flesh out our Hello World application a bit. The SEND HTML TEXT command can send full-fledged HTML. Go back to 4D's Design environment (choose "Design" from the Use menu), bring up the Explorer again ("Explorer" under the Tools menu), and double-click on the On Web Connection method again to edit it. The first thing we'll do is create a variable called $tHTML. We declare the variable using the C_TEXT command. Then we will fill the $tHTML variable with some simple HTML. Please type the following into your On Web Connection method.

C_TEXT($tHTML)

$tHTML:="<H1>Hello, World!</H1>"
$tHTML:=$tHTML+"<BR>This web page was dynamically generated by 4D!"

SEND HTML TEXT($tHTML)

screenshot

Your On Web Connection method should look like the one above. You should save the method; you can also click the close box to save it.

Return to your web browser, and re-load the page.

screenshot

Your web page should now look like the one above. If it does not, hold down the "Control" key (on Windows) or "Command" key (on Macintosh) when you click the Reload button. It is possible that your web browser had cached the page and didn't actually re-issue a request to 4D for a new one. Holding down Control or Command when you click Reload should force your web browser to make a new request.

Previous Step  1 2 3 4 5 6 7 8  Next Step


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