[Seaside] html5 canvas doesn't show processing.js sketch
nvrslx at hotmail.com
Wed Jan 18 18:46:02 UTC 2012
Thanks all! Problem solved!!
I didn't notice the XMLHttpRequest error.
XMLHttpRequest cannot load http://processingjs.org/sketches/basic-example.pde. Origin http://localhost:8080 is not allowed by Access-Control-Allow-Origin.
When you add the processing files to a seaside file library.The processing sketches work!! Just add the .js and .pde files to a file library.
Thanks for all your help.
> Date: Wed, 18 Jan 2012 08:36:33 -0800
> From: pdebruic at gmail.com
> To: seaside at lists.squeakfoundation.org
> Subject: Re: [Seaside] html5 canvas doesn't show processing.js sketch
> On 12-01-18 07:08 AM, nvr slx wrote:
> > src="http://processingjs.org/js/processing.min.js"></script
> > <http://processingjs.org/js/processing.min.js%22%3E%3C/script>>
> > <canvas
> > data-processing-sources="http://processingjs.org/sketches/basic-example.pde"></canvas
> > <http://processingjs.org/sketches/basic-example.pde%22%3E%3C/canvas>>
> When I put those lines in an html file and open it I get an error in
> firebug and nothing is displayed. Have you checked for javacsript
> errors in Firebug when running your seaside example?
> This is the error as reported in Firebug when opening those two lines:
> uncaught exception: Processing.js: Unable to load pjs sketch files:
> http://processingjs.org/sketches/basic-example.pde ==> XMLHttpRequest
> failure, possibly due to a same-origin policy violation. You can try
> loading this page in another browser, or load it from http://localhost
> using a local webserver. See the Processing.js README for a more
> detailed explanation of this problem and solutions.
> If I put those two lines in the head section of an html file with an
> empty body I get the same error.
> When I use the index,html file you posted in the first email I get the
> same error.
> Maybe its a Firefox thing. I don't know.
> seaside mailing list
> seaside at lists.squeakfoundation.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the seaside