[svg-developers] Detecting SVG Viewer 6 on Firefox

2005-08-16 Thread Renato Salas
Hi All:

Does anybody knows how to detect the presence of the Adobe SVG Viewer 6 
on Firefox?. I've been checking if these mimetypes are available:

navigator.mimeTypes[image/svg]
and
navigator.mimeTypes[image/svg-xml]

and it always return not null, so it means they are set even when the 
plugin is not installed.

Thank you very much in advance for your responses.


Renato F. Salas


 Yahoo! Groups Sponsor ~-- 
font face=arial size=-1a 
href=http://us.ard.yahoo.com/SIG=12hv39801/M=362329.6886308.7839368.1510227/D=groups/S=1706030389:TM/Y=YAHOO/EXP=1124220807/A=2894321/R=0/SIG=11dvsfulr/*http://youthnoise.com/page.php?page_id=1992
Fair play? Video games influencing politics. Click and talk back!/a./font
~- 

-
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click edit my 
membership
 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




Re: [svg-developers] eventListener crashing IE ????

2005-05-19 Thread Renato Salas
Hi:

I had the same problem. My IE crashed when I remove an element that has 
an event associated with it.

(*)For instance, having:

var labelRectElement = document.createElementNS(svgNS,rect);
labelRectElement.addEventListener(mouseover,this,false);

//adding the labelRectElement to another node
var labelGroupElement = svgdoc.getElementById(labelGroup);
labelGroupElement.appendChild(labelRectElement);

(*)...when I try to do this (remove labelGroupElement):

labelGroupElement.parentNode.removeChild(labelGroupElement);

(*)..everything still working but when I reload the page or try to 
change the URL to go to another site from the same window
my IE crashes. I guess internally some objects are still pointing to the 
registered elements.

So I implemented a method that actually unregister any event from all 
the childs nodes tree structure. It doesn't matter if an element
don't have an event associated, so it's safe to remove all anyway.

function removeChildElements(theParent, evtHandler) {
while((c = theParent.firstChild) != null) {
if (c.hasChildNodes()) {
removeChildElements(c, evtHandler); //recursive
} else {
if (c.nodeType == 1) {
c.removeEventListener(mousedown,evtHandler,false);
c.removeEventListener(mouseup,evtHandler,false);
c.removeEventListener(mouseover,evtHandler,false);
c.removeEventListener(mouseout,evtHandler,false);
c.removeEventListener(mousemove,evtHandler,false);
c.removeEventListener(click,evtHandler,false);
c.removeEventListener(keypress,evtHandler,false);
c.removeEventListener(SVGResize,evtHandler,false);
}
theParent.removeChild(c);
}
}
}

(*) So now I remove an element like this:

removeChildElements(labelGroupElement, this);
labelGroupElement.parentNode.removeChild(labelGroupElement);

(*)...and the IE don't crash anymore.



Hope that helps,

Renato F. Salas



Jorg Heymans wrote:

We've had some difficulties with this as well yes. The probleem seemed
to go away when you deregister the eventlisteners onunload().

HTH
Jorg

skrellkolja wrote:
  

I've been working with SVG for a while now and have encountered a very 
irritating bug. At least that what I think it is.
Suddenly IE starts terminating on refresh or when trying to enter 
another http-address. I have tried to understand when the problem 
occurs and it seems to be after adding an eventListener.

Does anyone know of any known bugs connected to the eventListener??

thx




-
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click edit my 
membership
 
Yahoo! Groups Links



 







-
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click edit my 
membership
 
Yahoo! Groups Links



 



  




-
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click edit my 
membership
 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




[svg-developers] HTML to SVG communication

2005-04-07 Thread Renato Salas

Hi everyone:

I was trying to use HTML Form Controls to update my SVG graphics. I've 
already accomplished that but that solution only works on IE under 
windows. I need it to work on Firefox, Netscape and Safari.

I used:

1st method:

Inside SVG: parent.myFunction = myFunction;
Inside HTML: onclick=myFunction();

2nd method:
Inside SVG: top.myFunction = myFunction;
Inside HTML: onclick=myFunction();

3rd method:
Inside SVG: browserEval(...);
I know this works on Mozilla based browsers, but I was only able to use 
it for calling javascript methods from SVG to HTML but not the other way.

Is there a way to send this statement: top.myFunction = myFunction; as 
a parameter to browserEval()?. Do you have any idea of how can I 
implement the HTML to SVG communication in a crossBrowser fashion?

Thanks in advance

Renato






-
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click edit my 
membership
 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/