This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to include a javaScript file inside XSLT file?

 
subbukumararaja chandrasekaran
Greenhorn
Posts: 17
  • 0
  • 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: 20185
26
MySQL Database
  • 0
  • 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
  • 0
  • 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: 20185
26
MySQL Database
  • 0
  • 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: 20185
26
MySQL Database
  • 0
  • 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.


 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic