PDA

View Full Version : Walterzorn



alim27
01-08-2008, 10:35 AM
Hi ,
i'm trying to bind Walterzorn Graphic library and use it. Link to the lib : http://www.walterzorn.de/jsgraphics/jsgraphics.htm
i've tried this :

<html>
<head>

<script type="text/javascript" src="wz_jsgraphics.js"></script>

<script type="text/javascript">
<!--
function generateMindMap()
{
try
{
var jg_doc = new jsGraphics();
}
catch (e)
{
alert(e);
}

jg_doc.setColor("#00ff00"); // grün
jg_doc.fillEllipse(100, 200, 100, 180);
jg_doc.setColor("maroon");
jg_doc.drawPolyline(new Array(50, 10, 120), new Array(10, 50, 70));
jg_doc.paint(); // zeichnet in diesem Fall direkt in's document
}
//-->
</script>
</head>
<body>

<script type="text/javascript">
<!--
generateMindMap();
//-->
</script>

</body>
</html>


but it didn't work. I get back the error message (the object is not defined). Does anybody have an idea ?

codeexploiter
01-08-2008, 10:52 AM
I've copied your code and downloaded and included "wz_jsgraphics.js" and the code is working in IE7, Firefox 2.0.11 and Flock 1.0.3 without showing any error. Make sure that you've included the JS file in proper manner.

alim27
01-08-2008, 10:58 AM
Thanks for your reply,
did it draw anything ?

codeexploiter
01-08-2008, 11:04 AM
Please find the screen shot of the page as the attachment.

alim27
01-08-2008, 11:13 AM
OK. I've got it.