Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help...Passing data island to popup window

Status
Not open for further replies.

tman24m

Programmer
May 21, 2001
93
US
I can't figure out the correct JavaScript to pass the XML data to a popup window and have it trasformed.

Gives me object doesn't support this property or method on
myxml.transform(myxsl.xml)

Here's what I've got


<SCRIPT LANGUAGE="JavaScript">
var oPopup = window.createPopup();
function popupLetters()
{
var oPopBody = oPopup.document.body;
oPopBody.style.backgroundColor = "lightyellow";
oPopBody.style.border = "solid black 1px";
window.alert(myxml.xml);
window.alert(myxsl.xsl);
window.alert(myxml.transform(myxsl.xml));
//oPopBody.innerHTML = myxml.transformnode(myxsl);
//oPopup.show(100, 100, 180, 25, document.body);
}
</SCRIPT>




and my data island looks like

<xml id="myxml"><contentgroup>....data....data....more data....</contentgroup></xml><xml id="myxsl" src="./AdjCont.xsl"></xml>


the script is located in <HEAD> and the data island is just before the </BODY>


help please
thanks
 
try this

Code:
window.alert(myxml.transformNode(myxsl));
oPopBody.innerHTML = myxml.transformNode(myxsl);

hth

simon
 
I got it a different way, thanks though. I'll post what I came up with..

function popupLetters()
{
try
{
var xslt = new ActiveXObject("Msxml2.XSLTemplate");
var xslDoc = new ActiveXObject("Msxml2.FreeThreadedDOMDocument");
var xslProc;
xslDoc.async = false;
xslDoc.resolveExternals = false;
xslDoc.load(myxsl);
xslt.stylesheet = xslDoc;
xslProc = xslt.createProcessor();
xslProc.input = myxml;
xslProc.transform();

win = window.open('','_blank');
win.document.write(xslProc.output);
}
catch(e)
{
print("Error occurred : " + e);
throw e;
}
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top