File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes JavaScript and XSL Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Practical Unit Testing with TestNG and Mockito this week in the Testing forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "JavaScript and XSL" Watch "JavaScript and XSL" New topic
Author

JavaScript and XSL

Annemarie McKeown
Ranch Hand

Joined: Nov 07, 2003
Posts: 47
Hello,
I am developing a xml driven web site. On the main index page for the site, I have some information about the latest special offers on holidays.
I want the user to click on the offer, which will then open a new window displaying the full details of that particular offer. I dont know how to approach this in xsl? The main page info. is contained in an xml file, the offers are all contained in multiple xml files according to a particular category - 3 categories - 3 xml files. I want the user to click on an offer on the main page, which will look up the relevant xml page and display this info in a new window.
Someone told me to use a JavaScript - Have the details of each offers fields passed to a Javascript routine accessed via an onClick handler on a link. The JavaScript routine is responsible for popping up a window and showing these details.
But how do I implement this, has anyone done this before?, or any good code online to help me.
Thanks.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15003
How are you pulling the XML to the page?
Are you planning on doing it ith a server side langugae or JavaScript?
Annemarie McKeown
Ranch Hand

Joined: Nov 07, 2003
Posts: 47
Hi,
I didn't know how to obtain information from three xml files, so I created a new xml file, which could be modified for details of latest special offers for the main index page only. Using xsl to transform the xml to xhtml.
I want then to click on the offers on the main page, and be redirected to the appropriate xml file, and look up information relative to that offer.
Again using xsl to transform the xml information
Someone told me that Javacsript was the best way to approcah this but like I said I dont know where to start, or how to implement.
Some guidance on how to start or approach would be helpful.
Many thanks.
 
 
subject: JavaScript and XSL
 
Threads others viewed
New to xml..need some help
pass control from child page to parent page
Buffer problem?
dealing with caching in IE
Eric and others plz answer
IntelliJ Java IDE