Including BASIC Code in HTTP Files

Top  Previous  Next

To create dynamic HTML pages, you include BASIC statements directly into the HTML file. A fragment of BASIC code is included within "<? ?>" encapsulation, as shown in the example below (for more info see Working with HTML):



<!DOCTYPE HTML public "-//W3C//DTD W3 HTML//EN">





         'This is a BASIC code snippet. We can, for instance, send something to the serial port


         ser.setdata("HELLO SERIAL WORLD TOO!")







Each time this HTML page will be requested by the browser, the "HELLO SERIAL WORLD TOO!" string will be sent out of the serial port.