[Home] [By Thread] [By Date] [Recent Entries]
If I have declared a processor and I want to pass parameters collected from
a form in an HTML page to my XSL stylesheet, isn't it as simple as the
example below?
~~~~~ start of Javascript snippet ~~~~~ var sCalType = checkRadio(theForm.grpOptions); var sSelection = theForm.lstCalendar.value; var xslStylesheet = "test.xsl"; ... var xslDoc = Sarissa.getDomDocument(); xslDoc.async = false; xslDoc.load(xslStylesheet); var processor = new XSLTProcessor();
processor.importStylesheet(xslDoc);
processor.setParameter(null, "type", sCalType);
processor.setParameter(null, "selection", sSelection);
...
function checkRadio(group){
for (x=0; x<group.length; x++) {
if (group[x].checked == true) {
val = group[x].value;
// alert(val);
}
}
return val;
}
~~~~~ end of Javascript snippet ~~~~~
If I use alert(processor.getParameter(null, "type")) the parameter value is null, and the transformation fails because nothing was passed into the XSL stylesheet.
|

Cart



