How to include JavaScript file into JSP? -
i have following script tag in jsp file:
<script src="/js/cctutil.js"></script>
with following function in it:
function disablebutton(buttonid) { document.getelementbyid(buttonid).setattribute("disabled", "true"); return true; }
and in jsp call with:
onchange="disablebutton('datasourceform:cancel');
datasourceform:cancel id, don't worry that.
this works if hardcode js function in jsp, when exporting file, doesn't work. recognizes valid filepath (otherwise server throws exception) can see file fine, when testing in internet explorer error "object expected", , points end of jsp file, of course isn't telling of anything.
help please?
the src must not correct then. sure have set path correctly? it's not supposed "../js/cctutil.js" it?
Comments
Post a Comment