Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Hongbo Zhang <bobzhang1988@gmail.com>
To: Pierre-Etienne Meunier <pierreetienne.meunier@gmail.com>
Cc: O Caml <caml-list@inria.fr>
Subject: Re: [Caml-list] An easy tutorial to js_of_ocaml?
Date: Thu, 20 Dec 2012 22:58:38 -0500	[thread overview]
Message-ID: <50D3DE6E.8060200@gmail.com> (raw)
In-Reply-To: <65E30EED-7FB4-44C6-B1EC-F304E55CAD77@gmail.com>

On 12/20/12 3:31 PM, Pierre-Etienne Meunier wrote:
> Hi,
>
> Personally, I learnt js_of_ocaml by first learning javascript using firebug in firefox. They have something called the console, similar to a toplevel, where you can directly manipulate the DOM to see what you are supposed to do with javascript, and immediately see the results on the webpage. Make a simple webpage, the most important point is that your elements all have a property called "id", and try to play with this toplevel before understanding it. A typical example is :
Thanks for your message, it's really helpful ;-)
> <html>
> <body>
> <div id="example">
> Blabla
> </div>
> <p id="aparagraph">
> Blibli
> <p>
> </body>
> </html>
>
> Then, in order :
>
> - try to make a table programmatically (using the Mozilla Developper Library).
> - use httprequests.
> - animate svg pictures
> - use canvas.
>
> Then if you learn about what javascript calls "prototypes", you're done learning javascript, and you can do all this in ocaml.
>
> Good luck
> Pierre
>
>
> Em 20/12/2012, às 17:41, bob zhang escreveu:
>
>> Dear List,
>>     I tried several times using js_of_ocaml, but did not get a working example yet, it  always gives me some error message like missing some primitives.
>>     I am absolutely a newbie in javascript, is there some simple working examples online?
>>
>>     I followed this thread, http://toss.sourceforge.net/ocaml.html, but the output JsClient.js does not work as I expected
>>     Thanks in advance!
>>
>> -- 
>> Regards
>> -- Bob


  reply	other threads:[~2012-12-21  3:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-20 16:41 bob zhang
2012-12-20 20:31 ` Pierre-Etienne Meunier
2012-12-21  3:58   ` Hongbo Zhang [this message]
2012-12-21  9:45     ` Çagdas Bozman
2012-12-21 16:56       ` Ashish Agarwal
2012-12-21 17:05       ` Gabriel Scherer
2012-12-21 20:55       ` bob zhang
     [not found] <fa.FJUwiHb9MCpx1s04UJaSR5DeNOI@ifi.uio.no>
2012-12-20 17:56 ` Barbara Lepage (db0)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50D3DE6E.8060200@gmail.com \
    --to=bobzhang1988@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=pierreetienne.meunier@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox