I would also recommend using a javascript library to help with the javascript, things like<br>innerHTML can act differently across browsers and libraries like jquery, yui, scriptalicious <br>help get away from filddling cross browser requirement, the dom selection is usually worth 
<br>them alone <br><br>$("#12345").html("..... some html")<br><br>another possible implementation would be flash, in which you can have a remote socket <br>connection that is used to notify updates to the client that a value has updated. it also 
<br>has graphing libraries in flex and certainly more powerful for drawing output. <br><br>canvas tags and svg are quite severely restricted in browser requirements, however drawing<br>line graphs in javascript is quite tricky so you might want to look around for existing code
<br><br><div><span class="gmail_quote">On 02/12/2007, <b class="gmail_sendername">Joe Armstrong</b> <<a href="mailto:erlang@gmail.com">erlang@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
It is extremely doable - it takes about 25-50 lines of javascript, and<br>a little erlang http server<br><br>Here is an outline of the method.<br><br>1) Wrap the regions you want to change with unique tags<br>    <div id="12345"> ... </id>
<br><br>2) To change the content within this tag you need to execute a<br>javascript statement<br><br>    document.getElemenById("12345").innerHTML = "..... some html""<br><br>3) To do this you need some javascript that calls erlang - the erlang
<br>should NOT return immediately<br>but return when the next update is required. The erlang return value<br>should return a string which contains the<br>"document.getElementByCommand command" - on getting the return value
<br>the javascript just "eval's" the result<br><br>4) Every time erlang returns you update the region on the page and<br>immediately call erlang again<br>which suspends until the next update comes.<br><br>I don't actually have short example of this - I have code for this
<br>wrapped up in a lot of other<br>junk that obscure the simplicity of the solution.<br><br>At this stage I would really recommend that you learn javascript. I<br>started by doing the exercises at<br><br><a href="http://www.w3schools.com/js/">
http://www.w3schools.com/js/</a><br><br>To do anything nice in a browser you need to learn javascript.<br><br>You also need to setup some server side stuff ( a little http server -<br>this can be as easy or  difficult<br>
as you like ...)<br><br><br>/Joe<br><br><br><br><br>On Dec 2, 2007 8:25 AM, Jouni Rynö <<a href="mailto:Jouni.Ryno@fmi.fi">Jouni.Ryno@fmi.fi</a>> wrote:<br>> I start from what I would like to have:<br>> A web page with a real time updated display of numerical values and
<br>> graphs. Think about typical process displays in industry,<br>> temperatures, voltages and some graphs showing parameter history.<br>> Maybe some graphical layout of hardware, to show how each parameter<br>> is connected to each other.
<br>><br>> To achieve that, I would need a  web page template format, where I can:<br>> - define named text fields, which shall be updated<br>> - define named graphics, which can be updated<br>> - and some code to generate the real page and connection functions
<br>> for (comet style?) communication with the page and erlang process<br>> feeding the data<br>><br>> Currently I have all that implemented as Tcl/Tk canvas (thanks to Ola<br>> Samuelsson and ewish, which was distributed with Erlang back in 97 or
<br>> so?)<br>><br>> As my understanding of "javascript" is practically zero, I would like<br>> get a hint on how to do this. Googling shows a lot of options, most<br>> of the systems not quite being there. Should it be simply javascript
<br>> and svg, changes updated via attributes. Or canvas tag (complicated<br>> with text fields?) Or haxe and flash (for which I did not find<br>> examples, how the update mechanism would work) Or something else?
<br>><br>> Is this doable? Some examples existing already?<br>><br>> Jouni<br>> _______________________________________________<br>> erlang-questions mailing list<br>> <a href="mailto:erlang-questions@erlang.org">
erlang-questions@erlang.org</a><br>> <a href="http://www.erlang.org/mailman/listinfo/erlang-questions">http://www.erlang.org/mailman/listinfo/erlang-questions</a><br>><br>_______________________________________________
<br>erlang-questions mailing list<br><a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br><a href="http://www.erlang.org/mailman/listinfo/erlang-questions">http://www.erlang.org/mailman/listinfo/erlang-questions
</a><br></blockquote></div><br><br clear="all"><br>-- <br> * <a href="http://hypernumbers.com">http://hypernumbers.com</a><br> * <a href="http://arandomurl.com/">http://arandomurl.com/</a><br> * <a href="http://www.flickr.com/photos/daleharvey/">
http://www.flickr.com/photos/daleharvey/</a>