This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Servlets and the fly likes Strange behaviour of JSP file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Strange behaviour of JSP file" Watch "Strange behaviour of JSP file" New topic
Author

Strange behaviour of JSP file

kiran bayyana
Greenhorn

Joined: Aug 15, 2000
Posts: 17
Hi all,
I am developing a JSP file and I wrote code for animating two images for that file. I want to run that code(JS function) in the body load event. But if I have JSP tags in my files, BODY's onload event is not working. I tried it without JSP tags(pure HTML and JS) and with other event handlers, it is working fine. Anybody, pls help. I tried image onLoad also, but it is getting into a loop continuously downloading the two images from the server.
- Kiran
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12683
    
    5
I suggest you do a view-source of the page produced by your JSP and go over it very carefully. Even a single misplaced " could be causing trouble.
Bill

Java Resources at www.wbrogden.com
kiran bayyana
Greenhorn

Joined: Aug 15, 2000
Posts: 17
I got the solution for my problem. Actually, I am writing a jsp include tag and including another HTML file. So, since there are two BODY tags, the onLoad event of BODY is not working. Anyway, thanks William for your reply.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Strange behaviour of JSP file
 
Similar Threads
onload not working with jsp
onreadystate change not working for iframe
calling js file from jsp.
Load jsp into div tag of another jsp
Directory Structure JSP & JS