pCOWeb
+030220966 – rel. 1.1 – 12.12.2017
78
Tips
Because of the not synchronicity of the function XMLHttpRequest, the very first time the web page loads, the values will be “undefined”, this can be resolved
in two ways:
•
Preloading the arrays with the values obtained by the
pCOWeb
using the HTML tags:
•
digitals[1]=“<%var(0,1,1)%>”;
•
Handling the exceptions on the javascript code
•
if (!digitals[1]) digitals[1]=“-”
This will show “-” when the element 1 of the array digitals is undefined
Web pages developed for version A135 of
pCOWeb
will be working for version A142 with no problems at all.
Advantages
1.
Web pages can reside in a Apache or IIS web server, they will have to connect to the
pCOWeb
only to download data, which is extremely useful for
integration or to overtake the limitations of the embedded web server of the
pCOWeb
(for example php or asp or .net could be used to generate dynamic
web pages)
2.
Any web developer is able to develop the page without knowing the
pCOWeb
tags
3.
The values can be automatically updated without the horrible refresh of the entire page
4.
Adding or removing variables to the page takes seconds
5.
Integration with Google gadgets, MacOSx widgets or flash animations using a standard interface
Disadvantages
1.
Values are retrieved seconds after the page is loaded, tricks can be used to preload the values on the web page using the standard tags of
pCOWeb
, if
the web pages lies in the card.
2.
Up to firmware A135 the requests keep the
pCOWeb
busier than the standard
pCOWeb
tags, and the more people are connected to the
pCOWeb
the
worse are the performance. This is not true anymore with firmware >= A142 as the cgi has been drastically improved.