Help - Search - Members - Calendar
Full Version: Skype4COM: JavaScript catch event
Skype Community > English > Development, Betas and Skype Garage > Skype Public API
abozhilov
Hi. I try to catch event from Skype4COM but my code is not correctly.
CODE
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <title>Skype4COM example</title>
        <script type="text/javascript">
            function startSkype()
            {
                if (!Skype.Client.IsRunning)
                {
                    Skype.Client.Start(true);
                }
            }
        </script>
    </head>
    <body onload="startSkype()">
        <object id="Skype" name="Skype" height="0" width="0" classid="clsid:830690FC-BF2F-47A6-AC2D-330BCB402664" codebase="http://localhost/Skype4COM.dll">
            <span style="color: red">Failed to load control.</span>
        </object>
        
        <script type="text/javascript" for="Skype" event="UserStatus(Status)">
            alert('change my status!!!');
        </script>
        
    </body>
</html>

What's my wrong?
And why this page http://testing.onlytherightanswers.com/skypebeta/Users.htm has down?
TheUberOverlord
I may need to change web hosting companies, will try to find a cached copy of my example you are looking for.
abozhilov
I fixed. When attached for API everything is OK.
CODE
<script type="text/javascript">
    function startSkype()
    {
        if (!Skype.Client.IsRunning)
        {
            Skype.Client.Start(true);
        }
        
        Skype.Attach(5, false);
    }
</script>
TheUberOverlord
OK,

My Internet Explorer example Scripts including http://testing.onlytherightanswers.com/skypebeta/Users.htm are working again.

The rest of my Internet Explorer Examples can be found here:

https://developer.skype.com/Docs/Examples#h...4a6dee9da2b9639
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.