I see. So your problem appears to be entirely about Javascript in the browser and not really about XSLT at all, since the error message says there's something wrong with the Javascript.
Your original question was this:
How to include a javaScript file inside XSLT file?
However you did that. Your real problem is, I think, that you didn't include the right Javascript inside the XSLT file. Here's the two-step process you should be following:
(1) Figure out what Javascript you need in your HTML page. Get that debugged and working.
(2) Write XSLT which produces that Javascript.
You're asking about step (2) when you haven't finished step (1) yet.