aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes onload not working with jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "onload not working with jsp" Watch "onload not working with jsp" New topic
Author

onload not working with jsp

nishad km
Greenhorn

Joined: Oct 14, 2004
Posts: 7
i have a jsp file in which i m calling a javascript in onload event, that java script method contain only one alert. but it doesnt work.
i called the same javascript fuction on click event of a button then the fuction get called.

i saved the same jsp file as html file then the every thing is ok , i m able to call the javascript function in onload event.

can any one say y one javacript method (onload)is not working in jsp and working in html
Nitish Bahadur
Ranch Hand

Joined: Aug 25, 2003
Posts: 118
Any more details(sample source code) will be greatly appreciated.

Regardless, any javascript code you have in your JSP is never executed by the Container. JSP is executed server side, and Javascript is executed client side, in the browser. So there should be no difference between the HTML or JSP, which I am assuming is producing the same/similar HTML, file containing the javascript.
 
wood burning stoves
 
subject: onload not working with jsp