B4J Question Web server and loop send/get

micro

Well-Known Member
Licensed User
Hi to all
I have a web server that constantly sending the read data from a serial, if on the browser I connect <ip: port> read only once the value without updating.
In Index.html I have added this:

<script type="text/javascript">setTimeout(function(){location.href=location.href} , 2000);</script>

with 2 second refresh.
This work but it's the only way or there are alternatives?
Thanks
 

micro

Well-Known Member
Licensed User
Hi Erel
but I want to use the standard browser installed on any device and PC and not the custom program/client.

Edit..
I'm sorry but you tips to use webview on the server?
And how active the webview from the server?
Where i can download the server code for the example in http://basic4ppc.com:51042/ ?
 
Last edited:

micro

Well-Known Member
Licensed User
Thanks Erel
can you post me the entire code (or attach file) for your previous example?
 

micro

Well-Known Member
Licensed User
;) Ok Erel
Now, how i can having a window with a predetermined size?
With "window.open......." in index.html, many windows are opened.
To have a default window of 100 x 300 with no menubar (popup style) how can I do?
Thanks
 

micro

Well-Known Member
Licensed User
Not full size (screen size) but reduced without menubar and not resizable, style popup window.
Thanks Erel for your interest
 

micro

Well-Known Member
Licensed User
ok Erel, I fixed the page refresh.
Now I have a problem on aligning text

in index.html
<p id = "variable"> </ p>

where variable is sent from the server and can be 3 to 11 characters length

in index.css
#variable {
font: bold 36px "verdana", "arial";
position: absolute;
left: 80px;
top: 55px;
color: #ffffff;
text-align: right;
}

but the position of the text is not aligned to the right and flows to the right if the length increases.
Where i have been wrong?

Some help ?
Thanks
 
Last edited:
Top