Serving web pages

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 2 and 3.

Moderators: Benj, Mods

Post Reply
abelloda
Posts: 5
Joined: Sun Jun 11, 2006 1:03 am
Contact:

Serving web pages

Post by abelloda »

Im trying to call some variables using the %MYVAR% syntax but i keep getting error messages saying to check C codes. I have tried taking out the '%' signs and it compiles ok then - but then dosen't display the variables when the web page is loaded.

Is there any documentation for this available? I have checked the help files available in flowcode - i seem to be doing what it says. How'd i go about fixing this, please?

Ian
Posts: 110
Joined: Thu Sep 29, 2005 10:53 am
Location: Matrix Multimedia
Been thanked: 1 time
Contact:

Post by Ian »

Check the Web Server component help file for details on using the variables.

"Variables
Up to four variables can be used in a web page.
This allows you to add an element of dynamic content - e.g. a temperature reading, to your web pages.

The variables need to be defined in Flowcode for you to be able to use them.
They are added to a web page by surrounding the variable name with % percentage signs e.g. %MYVAR%.
The variables are replaced by the current Flowcode value for that variable when the web page is sent.

The first four variables are processed when they are encountered. Any further variables are ignored. The variable names need to point to valid Flowcode variables. Other than that the names do not matter, so you do not need to have them in any specific order.

For example: "<p> %VAR1% + %VAR2% - %VAR4% = %VAR3%</p>" is fine as the variable numbering is not taken into account, only that they are the first four variables encountered in the web page."

E.g.
Define a variable called "Bob" in Flowcode
Set "Bob" to 100 in Flowcode
Put %Bob% in the HTML code
The value of "Bob" shows up in the web page.

Post Reply