I'm trying to use the graphics library wz_jsgraphics.js from
http://www.walterzorn.com (I've tried emailing the author but as yet
I've not received a reply).
I've loaded the external library into the top of a frameset and then
within one of the frames I have this code:
....
<link rel="stylesheet" href="fra.css" type="text/css" />
<script language="JavaScript" type="text/javascript">
window.onload = function() {
var jg = new top.jsGraphics("myCanvas");
jg.setColor("#ff0000");
jg.setStroke(3);
jg.drawLine(20,50,453,40);
jg.paint();
}
</script>
</head>
<body>
<div id="myCanvas" style="position:absolute; left:100px; top:100px;
width:100px; height:100px; z-index:1"></div>
....
but it keeps giving me unspecified errors. If I do this instead:
....
<link rel="stylesheet" href="fra.css" type="text/css" />
<script language="JavaScript" type="text/javascript"
src="scripts/wz_jsgraphics.js"></script>
<script language="JavaScript" type="text/javascript">
window.onload = function() {
var jg = new jsGraphics("myCanvas");
jg.setColor("#ff0000");
jg.setStroke(3);
jg.drawLine(20,50,453,40);
jg.paint();
}
</script>
</head>
<body>
<div id="myCanvas" style="position:absolute; left:100px; top:100px;
width:100px; height:100px; z-index:1"></div>
....
then it works. Is it possible, though, to get it working the first way
i.e. with the library loaded in the top of a frameset?
Andrew Poulos