The largest Interview Solution Library on the web


« Previous | 1 | 2 | 3 | Next »
Using alert() for debugging can get tiresome. Dojo has a built in logging mechanism. It's pretty easy to use.
First, enable debugging. This is done by setting the isDebug property of Dojo configuration to true.
<script type="text/javascript" djConfig="parseOnLoad: true, isDebug: true"
src="dojo-release-1.0.0/dojo/dojo.js">
</script>
Next, replace the alert() function with console.debug().
function showEvent(theEvent) {
console.debug("Event: " + theEvent.type +
" for element: " + theEvent.target.nodeName);
}
« Previous | 1 | 2 | 3 | Next »


copyright © 2014 - all rights riserved by javatechnologycenter.com