Welcome to WebmasterWorld Guest from 220.127.116.11
Forum Moderators: open
<div id="myCanvas" style="position:relative;height:50%;width:50%;"></div>
var jg = new jsGraphics("myCanvas");
jg.fillRect(110, 120, 30, 60);
<title>New Page 1</title>
<input type="button" value="Button" name="B3" onclick="myDrawFunction()"></p>
Is the code above how the page looks? Are you placing all of that code outside the HTML tag? Why do you have an orphan myDrawFunction() call in the script tag?
I am also assuming that the wz_jsgraphics.js has the object functions like paint()?
<div id="myCanvas" style="position:relative;height:50%;width:50%;">HELLO</div>
For some reason it would not draw anything on the layer until I have some text placed on the layer. Is there a way round this? Rather than having 'HELLO' or whatever on my page?
I have set the colour of this text to white so I cant be seen but even so would like to know why it would not work first time.