W3C home > Mailing lists > Public > www-svg@w3.org > April 2007

Accessing sjavascript in parent window from within an embedded svg

From: vyasvemu <vyvm_2001@yahoo.com>
Date: Thu, 5 Apr 2007 05:37:23 -0700 (PDT)
Message-ID: <9854976.post@talk.nabble.com>
To: www-svg@w3.org

I embedded an svg document in an HTML page. One of the svg elements has a
"onmouseover=toggle(evt)" event handler. If I place the "toggle(evt)"
function in the top HTML page, I am getting "toggle is not defined error" in
Mozilla Firefox.

If I place the "toggle" function in the svg document itself, the function is
being recognized and called. However, the "toggle" function needs to fire
another script in the main HTML page. 

How do I access the script in parent window from within the embedded svg?

The following is not working..

    var elem = evt.target.ownerDocument.parentNode;   // returns undefined

   or 
    
   var elem = evt.target.ownerDocument.contentWindow;   // returns null.

Please help !!!

Vyas Vemu


-- 
View this message in context: http://www.nabble.com/Accessing-sjavascript-in-parent-window-from-within-an-embedded-svg-tf3531318.html#a9854976
Sent from the w3.org - www-svg mailing list archive at Nabble.com.
Received on Friday, 6 April 2007 03:12:16 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:36 GMT