A few things...
First not sure why you disabled BBcode, the post looks fine with it enabled and it's much more readable this way.
Second people need to stop referencing elements as tags.
<element attribute="value" />
When referencing HTML elements please use the word element.
Third I deleted the double post for you.
Fifth don't put script elements in the body element, it's really bad practices and encourages things like document.write and innerHTML among other things which are horribly unreliable.
Lastly I don't know much about Canvas though I have cleaned up the document for you. Save this to a file with an xhtml
- Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
var img=new Image();
<h1>Canvas Example 1</h1>
<img src="helloi.gif" width="133" height="100" />
<canvas id="example" width="400" height="100" style="border:3px solid #000000;">
Your browser does not support the canvas element.
XHTML is stricter but if you screw up your code it'll be much easier to fix your code.
As far as doing this in general you'll need someone else who knows how to work with Canvas.
I tested this in Safari since Apple came up with the canvas element (I think offhand?) and the developer console was spawning some errors so start with that.