Hi,
Is it possible to send data larger than a byte with the webserver component, and if so, how is this done? Thanks!
Web Server EB023-00-2
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Web Server EB023-00-2
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
All data type can be split into bytes and re-assembled at the remote end.
intvar = 0xFFFF
bytehigh = ( intvar >> 8 ) & 0xFF
bytelow = intvar & 0xFF
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 7
- Joined: Sat Dec 01, 2012 5:54 pm
- Has thanked: 1 time
Re: Web Server EB023-00-2
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>
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>