<html> <head> <title>Example</title> <script FOR="DcrObj" EVENT="externalEvent(aParam)" LANGUAGE="javascript"> alert("Check this out: javascript "); </script> <script FOR="DcrObj" EVENT="externalEvent(aParam)" type="text/javascript"> alert("Check this out: text/javascript"); </script> <script type="text/javascript"> function onEventHandler(event) { alert("Hurrey New option::: attachEvent"); } window.onload = function() { var yourActiveXObject = document.getElementById('DcrObj'); if(typeof(yourActiveXObject) === 'undefined' || yourActiveXObject === null){ alert('Unable to load ActiveX'); return; } else { if (window.addEventListener) { // all browsers except IE before version 9 yourActiveXObject.addEventListener('externalEvent',onEventHandler,true) } if (window.attachEvent) { // IE before version 9 yourActiveXObject.attachEvent('externalEvent', onEventHandler); } } } </script> </head> <body > <div id="flashContent"> <object width="800" height="600" id="DcrObj" codebase="http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab" classid="clsid:166B1BCA-3F9C-11CF-8075-444553540000"> <param name="swStretchStyle" value="meet" /> <param value="OverView02.dcr" name="src"> <embed width="100%" height="100%" src="OverView02.dcr" pluginspage="http://www.macromedia.com/shockwave/download/"> </object> </param></div> </body> </html>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)