Hello chaps,

I'm playing around with SVG on Opera (fun!), but I'm having trouble
with the onload event - I'd like to be notified when an image I add
(through the DOM) has loaded, as per the example below.  But in Opera
9.23 it doesn't appear to do the onload.  Am I misinterpreting how
onload is supposed to work?  Is it a bug or feature-to-be-implemented
in Opera?

(What I want to do is display a movie one frame at a time so that
there aren't any visual glitches - I figure I need to display an
image, load the new image in front with display="none", and when the
new image has finished loading change the display to "inline" and
remove the old image from behind).

Cheers,

Andrew.

In the below example, I would expect (provided test.jpg is in the
correct place) first an alert "foo", then an alert "bar".  However,
only the first event is triggered.

<?xml version="1.0"?>
<svg 
    xmlns="http://www.w3.org/2000/svg"; 
    xmlns:xlink="http://www.w3.org/1999/xlink";
    version="1.1" 
    viewBox="0 0 200 200"
    onload="init()">

    <script type="text/ecmascript">
        <![CDATA[
            function init()
            {
                var img1 = document.createElement("image");
                img1.setAttribute('height', "100");
                img1.setAttribute('width', "100");
                img1.setAttribute('onload', "alert('bar');");
                img1.setAttributeNS('http://www.w3.org/1999/xlink',
'xlink:href', 'test.jpg');
                document.getElementById("test").appendChild(img1);
            }
        ]]>
    </script>
  
    <g id="test"/>
    
    <image x="100" y="0" height="100" width="100"
onload="alert('foo');" xlink:href="test.jpg"/>
    
</svg>




-----
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/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/svg-developers/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> 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/
 

Reply via email to