Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to include a javaScript file inside XSLT file?

 
subbukumararaja chandrasekaran
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I need to include a java script file (poupcalendar.js) into XSLT file.

So that i can call the calender method from xslt components.

Below is my code in XSLT file.


When i try to invoke a method popUpCalendar() from popupcalender.js as below it is not recognizing and throwing some error.



Could some body help me on this?

-Subbu
 
Paul Clapham
Sheriff
Pie
Posts: 20958
31
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
subbukumararaja chandrasekaran wrote:
When i try to invoke a method popUpCalendar() from popupcalender.js as below it is not recognizing and throwing some error.


Sure. Your first two steps are these:

(1) Figure out what is throwing the error (i.e. what is the "it" which you are talking about?)

(2) Figure out what is the "some" error (i.e. read the error message)

You can read TellTheDetails for more hints about how to describe problems on forums.
 
subbukumararaja chandrasekaran
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
here the "it" represents the button click.

the error i am getting after i clicked the button is


that is exactly on the line where i am calling PopupCalender().
 
Paul Clapham
Sheriff
Pie
Posts: 20958
31
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.


 
Paul Clapham
Sheriff
Pie
Posts: 20958
31
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic