cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Schwarz" <>
Subject RE: Embedded JavaScript file inside dynamic SVG isn't working
Date Wed, 11 Feb 2004 03:46:13 GMT
Hi Guatam,
>hi Steve,
>  This is the same mail that i sent to your mail box directly.. i am
>extremely sorry for that.These mail is to the cocoon users group to
>rectify that mistake of mine.
It was my "bad" that started this; I must have sent directly to you.

>and wrt ur mail ,these is what i found:
>   I tried accesing the MoveCircle.js file from the client machine using
>(url = http://localhost/cocoon/SvgApps/scripts/MoveCircle.js) and it
>works fine from there.So i think that sitemap seems to pick it up fine.
>  I tried removing the mime-type for .JS files and still got the same
>error Message Box which says "Microsoft JScript runtime error:Object
>expected line:1,column:0"

I'm not an SVG/JS expert, so I'd tackle this by trying to remove some
more variables. Since it looks like Cocoon is delivering all the pieces;
double check your paths are generated as you expect. If that is good
I'd modify your example to just run in the browser from the local filesystem
and not send any of it through Cocoon. Forgive me if you've tried this
already; I'd just try to figure out if this a Cocoon problem or an SVG 

>   I am not using the .js file from inside the html page which gets
>generated but from inside the .svg file...bcos the in the future, i
>would like the dynamically generated svg to just work as the main svg
>container which internally is built up of other svg image layers using
>the svg:image tag so that the final  svg image created  have there own
>user event handling based on what layer is currently active.
>   Since you said you have been using .JS from the html container
>page,have you been able to get hold of the handle to the svg doc
>element ?

Take a look at the O'Reilly SVG Essentials by J. David Eisenberg he
has a small section on ecmascript and SVG. There might be other
books that are better...

He does:
<script type="text/ecmascript">
function ecircle(evt) {
var circle=evt.getTarget();
circle.setAttribute("r", 50);

function scircle(evt){
var circle=evt.getTarget();

<circle cx='150" y="175" r="25" fill="red"

He states the JS onmouse*() handlers interact with the SVG using the evt SVG 

That is all I know!

Check out the great features of the new MSN 9 Dial-up, with the MSN Dial-up 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message