Displaying XML as HTML in a popup

R

Rusty

Hi, our intranet web site needs to add this feature. I've got the
components but just need the last step to get it going.

Here's the setup.
1) a user clicks on a link which calls a web service (I will use AJAX if
necessary)
2) the web service returns a string datatype which is filled with
well-formed XML
3) I have an XSLT transform which outputs HTML (i tested it with a tool
called XFactor (www.nombas.com). Pretty cool tool, I write XML & XSLT
and it transforms the output for me!
4) (this is where I can't put it all together). I want to take the XML
string from the web serivce, transform it with a XSLT (which is in a
folder on the web server) and open it as a popup. Here is how I open a
different popup from javascript. I like the options and would like to
do the same with this dynamic HTML that's created
window.open("example.aspx?id=2","Example","width=550,height=400,left=80,
top=20,toolbar=1,location=1,directories=0,status=1,menuBar=1,scrollBars=
2,resizable=1");

Can someone help me "put it all together" (1) the transform piece with
the web service's xml and (2) the popup piece of the transformed HTML?

Thanks so much!
Rusty
 
G

Guest

Rusty,
I think what you really need to do here is have the popup load an ASPX Page
that does the webservice call, loads the XSL stylesheet, does the transform,
and then emits the resultant HTML into your popup.

Plenty of sample code around on how to do XSLT transforms in ASP.NET without
having to resort to "third party tools".
Peter
 
R

Rusty

Peter, thanks a bunch. So the linkbutton opens the popup with the
settings I want. The codebehind calls the web service, transforms the
XML with the XSLT, and does a write to the screen of the html. Sounds
good. My XSLT returns all of the html, including the html, head, body,
etc. tags. Sounds like I can leave that out and just write to the
screen. Can you pass me any good code to do the transform of the XML
using the XSLT and the write to the page piece? Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top