I have a
servlet that generates html code to display a page back to the user. In this html code, I'm trying to place a reference to a
java script file.
"<script language='javascript' src='../myscript.js'></script>"
The page gets generated, however when the user does something that calls a function in the java script, the page bombs out. The only way I can get this to work is to actually embed the java script in the html page that is sent back.
"<script language='javascript'>function submitForm(inParam){this.document.resultsform.dml.value=inParam;this.document.resultsform.submit();}</script>"
My thought was that maybe I can't embed a reference to a java script because there's no actual html page that exists and therefore no context for the java script file to be referenced to. Anyone have any experience feedback on this?
Thanks in advance.
David