Login Register

Dojo.connect

Please help. I am unable to connect these simple function using dojo.connect. The commented code [dojo.connect(anchor,"onclick",dummyAgain)] works but not the connection b/w [dojo.connect(dummy1,dummyAgain)]

<head>
         <script type="text/javascript" src="../js/dojo-1.0.2/dojo/dojo.js"
            djConfig="parseOnLoad: true, usePlainJson: true">

         </script>

<script>
        function dummyAgain(){
                console.debug("dummyAgain");
        }
        function dummy1()
        {
                console.debug("dummy1");
        }
        function dummy(){
                console.debug("dummy");
                dummy1();
        }
        //var anchor = dojo.byId("id1");
        //dojo.connect(anchor,"onclick",dummyAgain);   <!-- working -->
        dojo.connect(dummy1,dummyAgain); <!-- NOT working -->
</script>
</head>
<body>
<a href=#" id="id1" onclick="dummy()">Click</a>
</body>

try this

dojo.connect(null,dummy1,dummyAgain);
--
http://www.liucougar.net
生于忧患,死于安乐
"People's characters are strengthened through struggle against difficulties; they are weakened by comfort."
- Old Chinese adage