Re: [xsl] Javascript variable to XSL variable

Subject: Re: [xsl] Javascript variable to XSL variable
From: Robert Koberg <rob@xxxxxxxxxx>
Date: Thu, 17 Feb 2005 12:45:29 -0800
Camalesn wrote:
On Thu, 17 Feb 2005 20:00:50 +0000, Antsnio Mota wrote:

I didn't follow this thread, but i have a lot of xslt being called
from Javascript passing parameters to it, what's the problem?


- I am using Sablotron and PHP to parse / transform XML with XSL file.
A total of 3 files: processor.php, data.xml and template.xsl.

- I need to bind a Javascript variable to XSL variable.

Sabletron works on the server (not that I have ever used it, but...). It sends the transformed HTML (including your select) to the browser. Javascript works in the browser. It cannot communicate with Sabletron.

What you can do is submit a form with your required parameters and transform a new HTML page to be sent back to the browser.

Another option is to use XMLHttpRequest(on safari, and mozilla based browsers) and ActiveXObject("Microsoft.XMLHTTP") on IE to send your information and get a result without a page refresh. You will still need to use JavaScript to do the send, recieve and then change the HTML.


- I guess you are using Microsoft parser... isn't it?

Current Thread