Erlang/OTP Forums

Author Message

<  Advanced Erlang/OTP  ~  Run GS through Javascript

jananigopalan
Posted: Mon Jun 30, 2008 12:34 pm Reply with quote
Joined: 30 Jun 2008 Posts: 2 Location: Hyderabad, India
I want to invoke Erlang GS in Browser window.
For that I want to call GS in Erlang through Javascript.

I have very less idea on how this can be implemented. Please help me to sort out this problem.
View user's profile Send private message
michal
Posted: Wed Jul 02, 2008 11:50 am Reply with quote
User Joined: 20 Jul 2006 Posts: 44 Location: London
Hi,
If you want to call Erlang modules from JavaScript running in the browser, you would need your HTTP server to transform HTTP requests into Erlang function calls. One way of doing it is to setup Yaws (Erlang HTTP server) and develop some *.yaws pages that would call functions you need and then return what you need. Yaws also supports json, so you can use ajax-like scripts.

Last week we have released ErlangWeb - a platform for developing web applications in Erlang. It is built on top of Yaws and gives couple of very handy features. One of those are controllers. You can easily call Erlang functions by sending http requests to url like: http://localhost/app/module/funcion This will call module:function(). ErlangWeb can return html or json data. More details can be found in a tutorial included in the zip. You can download ErlangWeb from http://sourceforge.net/project/showfiles.php?group_id=231549

We are working on a new release of ErlangWeb, so if you will find it useful, keep an eye on the project web page.

Michal

_________________
http://www.erlang-consulting.com
View user's profile Send private message

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum