I can not get this piece of code to work (I am expecting the page to show me an alert with 1 as the value) and also do not see any errors. What am I missing?
Greg A Watson
Joined: Mar 28, 2006
Santosh, I've run your code in Firefox & IE7, and it works perfectly fine - your code also looks good. Could it be that the location of dojo.js doesn't match your file system? When the page is loaded, look in Firebug to see if Dojo has bootstrapped - if so, an object named 'dojo' should have been created.
Joined: Apr 04, 2004
Greg, You are right I had to change the way I was using dojo.js location from src="js/dojo/dojo.js" to src="<%=request.getContextPath()%>/js/dojo/dojo.js" and it worked.