Google Groups

Re: Do not all servers permit Processing.js or what is wrong?

buri Mar 11, 2012 11:59 AM
Posted in group: Processing.js

your html-document is simply incomplete, the browser needs a little bit more to know what you want him to do.

Try this:
<DOCTYPE html>

<script src=""></script>
<script type="text/processing" target="processing-canvas">
void setup() {
   size(200, 200);
 ellipse(50, 50, 25, 25);
 println('hello web!');


<canvas id="processing-canvas"> </canvas>


I know that Processing is intended to hide the technical details to the creative programmer and I think this is a good thing.
ProcessingJS is a great thing as it brings this to the web, but there is a bit of web-designer know-how that you need to know in order to get started.

Best regards,

On Sun, Mar 11, 2012 at 2:14 AM, Benj. N. Sugar <> wrote:
are borrowing from the example located here under "It is possible to
put Processing code directly in your web page":

if you are, that's a slightly tricky example since it doesn't give you
any reference with regard to what goes in the <head> and what goes in
the <body> (though it might be implied that its all in the <body>
since the <canvas> won't be in the <head>.

instead, try pomax's example located here under "Putting your sketch
in line on a page":

as pomax notes, this is not the "preferred" way of using
processing.js; you can see his explanation for why below the example.

as i understand servers and clients your server is agnostic when it
comes to supporting canvas or processing.  its just a place to get the
files from, it doesn't do any of the computation (in this use case).
it is possible that your browser doesn't support canvas but i doubt
that is the problem in this case since your sketch doesn't work in my
browser and my browser does support canvas.  unless its internet
explorer which i think was late to the game on supporting canvas.  one
thing to be aware of with free server space (or any space for that
matter) is that where ever you put the files in needs to have
permissions such that the browser can access the file.  this does not
appear to be a problem in your sketch because i was able to see that
it downloaded the processing.js file using firebug and your processing
code is inline.

You received this message because you are subscribed to the Google Groups "Processing.js" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at