[erlang-questions] how: ot: real time web pages?

Chandru chandrashekhar.mullaparthi@REDACTED
Sun Dec 2 12:26:18 CET 2007


On 02/12/2007, Joe Armstrong <erlang@REDACTED> wrote:
> It is extremely doable - it takes about 25-50 lines of javascript, and
> a little erlang http server
>
> Here is an outline of the method.
>
> 1) Wrap the regions you want to change with unique tags
>     <div id="12345"> ... </id>
>
> 2) To change the content within this tag you need to execute a
> javascript statement
>
>     document.getElemenById("12345").innerHTML = "..... some html""
>

Beware of this. Setting innerHTML works in some cases in some
browsers. I went down the Ajax route for one of our OMCs and now I
have an OMC where it takes about three different browsers to use all
the features :-(

I used prototype.js which eased the implementation a lot but didn't
fully solve browser compatibility issues.

Look at Google webtoolkit GWT. You can write GUI code in Java which
gets compiled to Javascript. I haven't tried it but given the success
they have had with cross browser compatible web GUIs, it is worth a
try.

cheers
Chandru



More information about the erlang-questions mailing list