Bengaltgrs
01-18-2008, 02:18 PM
I don't know if anyone has used the library from this site:
http://www.walterzorn.com/jsgraphics/jsgraphics_e.htm
But I am trying to draw a line with a function being called from the body, and it does nothing but stall the page. Does anyone know why this doesn't work (assuming you're familiar with the library)?
<html>
<head>
<script type="text/javascript" src="wz_jsgraphics.js"></script>
<script type="text/javascript">
var jg_doc = new jsGraphics();
</script>
</head>
<body>
<a href="javascript:go()">go</a>
</body>
</html>
<script>
function go()
{
jg_doc.setColor("#0000ff");
jg_doc.drawLine(10, 113, 220, 55);
jg_doc.paint();
}
</script>
http://www.walterzorn.com/jsgraphics/jsgraphics_e.htm
But I am trying to draw a line with a function being called from the body, and it does nothing but stall the page. Does anyone know why this doesn't work (assuming you're familiar with the library)?
<html>
<head>
<script type="text/javascript" src="wz_jsgraphics.js"></script>
<script type="text/javascript">
var jg_doc = new jsGraphics();
</script>
</head>
<body>
<a href="javascript:go()">go</a>
</body>
</html>
<script>
function go()
{
jg_doc.setColor("#0000ff");
jg_doc.drawLine(10, 113, 220, 55);
jg_doc.paint();
}
</script>