Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

jsp and javascript problem

Status
Not open for further replies.

porto2001

Programmer
Mar 7, 2001
24
PT
I have several jsp's files that retrieves two external files that contains javascript code, like this:

<SCRIPT SRC=&quot;/js/Script1.js&quot; LANGUAGE=&quot;JavaScript&quot;></SCRIPT>
<SCRIPT SRC=&quot;/js/Script2.js&quot; LANGUAGE=&quot;JavaScript&quot;></SCRIPT>

On &quot;Script2.js&quot; i call some functions in &quot;Script1.js&quot;.

My problem begins when i try to run some of the jsp's files, by some reason that i can't understain, the generation of the file breaks halfway to the end. I try to see the source code in the browser and appears like this:

<HTML>
<HEAD>
<SCRIPT SRC=&quot;/js/Script1.js&quot; LANGUAGE=&quot;JavaScript&quot;></SCRIPT>
<SCRIPT SRC=&quot;/js/Script2.js&quot; LANGUAGE=&quot;JavaScript&quot;></SCRIPT>
</HEAD>

<BODY>
<table>
...
</table>

<INPUT TYPE=&quot;hidden&quot; NAME=&quot;CARGO&quot; VALUE=&quot;0&quot;>
<INPUT type=&quot;hidden&quot; name=&quot;PROCESS&quot; value=&quot;STPS&quot;>
<INPUT type=&quot;hidden&quot; name=&quot;ACTION&quot; value=&quot;EMPTY&quot;>
<INPUT TYPE=&quot;hidden&quot; NAME=&quot;com.ibm.websphere.current_uri&quot; VALUE=&quot;/jsp/true.jsp&quot;>
<INPUT TYPE=&quot;hidden&quot; NAME=&quot;com.ibm.websphere.olt.forward.request&quot; VALUE=&quot;Servlet&quot;

note that the last line didn't reach the end.
The problem only happens in some jsp's and the precise location of the break depends of the jsp, but it's always more or less in the same area.

But when i put the two js files in one, this problem disappears. I'm trying to understain why ????
thanks...
 
I think it might be due to some syntax erro in one of the JS Files. Do u have same methods in both the files?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top