Disconnect function : disconnect « Dojo toolkit « JavaScript DHTML






Disconnect function

 

<html>
  <head>
    <link rel="StyleSheet" type="text/css"
      href="js/dojo/dijit/themes/tundra/tundra.css">
    <script type="text/javascript">
      var djConfig = {
        baseScriptUri : "js/dojo/",
        parseOnLoad : true
      };
    </script>
    <script type="text/javascript" src="js/dojo/dojo/dojo.js"></script>
    <script>
    function Foo(  ) {
       this.greet = function(  ) { alert("foo"); }
    }
    function Bar(  ) {
       this.greet = function(  ) { alert("bar"); }
    }
    
    foo = new Foo;
    bar  = new Bar;

    var handle = dojo.connect(foo, "greet", bar, "greet");
    foo.greet(  );


    dojo.disconnect(handle);

    </script>
  </head>
  <body class="tundra">


</body>
</html>

   
  








Dojo-toolkit.zip( 3,849 k)

Related examples in the same category