Page 1 of 1
Web Server EB023-00-2
Posted: Fri Dec 07, 2012 6:32 pm
by infinitusCR
Hi,
Is it possible to send data larger than a byte with the webserver component, and if so, how is this done? Thanks!
Re: Web Server EB023-00-2
Posted: Mon Dec 10, 2012 11:43 am
by Benj
Hello,
All data type can be split into bytes and re-assembled at the remote end.
intvar = 0xFFFF
bytehigh = ( intvar >> 8 ) & 0xFF
bytelow = intvar & 0xFF
Re: Web Server EB023-00-2
Posted: Wed Dec 12, 2012 1:29 am
by infinitusCR
Thanks!
One more question. I cant seem to view the different pages of the web component (pages 2-4.htm). If I rename any given page to index.htm it can be viewed, but if acces it via a link (using html a href) all it does is reload the current index.htm page. However, if I include an a href link to, say google, it works. Even if I type the url of another webserver component page all it does is reload index.htm. What could be the problem?
<html>
<head>
<title>Estacion Meteorologica</title>
</head>
<body BGCOLOR="#FFFFFF">
<font face="arial">
<h1>Estacion Meteorologica</h1>
<pre>
<script>
var dir=%DIRECCION%;
dir=dir*2;
var vel=%VELOCIDAD%;
vel=vel*0.06479;
vel=Math.round(vel);
var prom=%PROMEDIO%;
prom=prom*0.06479/24;
prom=Math.round(prom);
if (vel=0)
{
document.writeln("Direccion: ","En Calma");
document.writeln("");
document.writeln("Velocidad: ","En Calma");
document.writeln("");
document.writeln("Promedio: ","En Calma");
}
else
{
document.writeln("Direccion: ",dir);
document.writeln("");
document.writeln("Velocidad: ",vel);
document.writeln("");
document.writeln("Promedio: ",prom);
}
</script>
</font>
</pre>
<a href="index.htm">Atmosfera</a>
</body>
</html>