[Seaside] Javascript, SVG and callbacks

Marco D'Ambros marco.dambros at lu.unisi.ch
Thu Oct 30 16:29:50 UTC 2008


Hi,

I am trying to attach to an anchor a Javascript action and a callback,  
but did not succeed so far.
To be more precise, I am working with SVG figures and I want to remove  
a figure from the html page (without refreshing it) and the object  
linked to the figure from the smalltalk application.

To remove the figure I can do something like:

	(html svgAnchor)
		onClick: (html javascript add: 'var p =  
document.getElementById(''canvas_contents''); var c =  
document.getElementById(''anchor-',self id,'''); p.removeChild(c);');
		id: 'anchor-', self id ;
  		with: [ self drawOn: html]

But I would need also a callback to update the "smalltalk side" and  
remove the object linked to the svg figure.

Any ideas?

Thanks and cheers
Marco



More information about the seaside mailing list