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
Hi,

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>
<html>
<head>

<script src="http://endersdrift.freeiz.com/processing/processing-1.3.6.min.js"></script>
<script type="text/processing" target="processing-canvas">
void setup() {
   size(200, 200);
   background(100);
   stroke(255);
 ellipse(50, 50, 25, 25);
 println('hello web!');
 }
</script>

</head>
<body>

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

</body>
</html>

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,
Erich



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

http://processingjs.org/articles/p5QuickStart.html

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":

http://processingjs.org/articles/PomaxGuide.html

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 proces...@googlegroups.com.
To unsubscribe from this group, send email to processingjs...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/processingjs?hl=en.