I Have an external javascript which works fine but if i put that code into a function and then call that function "onLoad" in body, page gets stuck.
This script is supposed to set the CSS based on the browser type. I have checked it is being called and it does set the css but page does not...
That also is not the reason as I tried this very simple script its not working either. It works fine when within the jsp file but when I call it externally nothing happens.
both the jsp n js files are in same dir
following are the codes for jsp and view source out:
Jsp:
<jsp:root version="2.0"...
Bud dian according to my understanding when we include an external js it is included as part of that page, isn't it. so it should be server side processed. I am very new to all this jsp and js world, so please can you guide me what actually happens when we use an external js using:
<script...
No i did copied from View Source and there really is no End tag "</script>"...
But I think Dian is right... cuz I havent tried this. anyhow now i am out of office and dont have access to the code atm, will try dian's tip tomorrow.
but if you could think of anything else that could cause...
it only shows the page without any formating as Css is not set and at the top of page it shows the name of browser if i include "document.write(navigator.appName)" this in the script as well.
and this is the source info of the output page:
<html><head><title>Riverfly Partnership</title><script...
Hi everyone
I am trying to call a very very simple external javascript in a jsp page. This script works fine when is in the jsp file but when i try to call it by
<script src=selectCss.js></script> or
<script src="${pageContext.request.contextPath}/docroot/samples/js/selectCss.js"></script>
it...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.