This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes DOJO1.2.3/ IE7 /addOnLoad() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "DOJO1.2.3/ IE7 /addOnLoad()" Watch "DOJO1.2.3/ IE7 /addOnLoad()" New topic
Author

DOJO1.2.3/ IE7 /addOnLoad()

Santosh Ramachandrula
Ranch Hand

Joined: Apr 04, 2004
Posts: 252
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?



Thanks,
Santosh
Greg A Watson
Greenhorn

Joined: Mar 28, 2006
Posts: 6
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.

Greg
Santosh Ramachandrula
Ranch Hand

Joined: Apr 04, 2004
Posts: 252
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.

I am still not sure why the page did not show a javascript error in IE7.0 when I was using src="js/dojo/dojo.js" something like "dojo is undefined"?
(FF 3.0.4 does show JS error "dojo is undefined").
[ December 11, 2008: Message edited by: Santosh Ramachandrula ]
 
 
subject: DOJO1.2.3/ IE7 /addOnLoad()
 
Similar Threads
not able to get width and height of another html file inside html
Can you find the bug in <div> I do NOT get sample xml data[bookrss.xml]... RSS Client/Server
Need help with Jquery
Help needed with DOJO and JSP
this.title returning undefined