<html>
<head>
<script type="text/javascript">
var djConfig = {
baseScriptUri : "js/dojo/"
};
</script>
<script type="text/javascript" src="js/dojo/dojo/dojo.js"></script>
</head>
<body>
<script>
function MyClass() {
this.sayHello = function(inName) {
alert("old: " + inName);
}
}
function interceptor(inName) {
document.write("new: " + inName);
}
var myObject = new MyClass();
dojo.connect(myObject, "sayHello", null, interceptor);
myObject.sayHello("A");
</script>
</body>
</html>
|