Altova Mailing List Archives
>microsoft.public.xml Archive Home
>Recent entries
>Thread Prev - transfer xml content to new window
[Thread Next]
Re: transfer xml content to new window
To: NULL
Date: 2/17/2004 10:07:00 AM
Well - it wasnt so difficult at all - just had to put in a "target=%windowname%" in the "<a>" tag. (basic htm .. urghh) rgds Jakob On Tue, 17 Feb 2004 08:34:46 GMT, outzen@p... (Jakob Outzen) wrote: >Its probably very simple, however having difficulties with forcing >below script to open in another window, when user hits the "<A>" tag ! >Basicly the page is loaded in a top frame (frameset consists of a top >and bottom frame), and I would like it to open the "vis_indlaeg.asp" >in the bottom frame. > >****************"til_html_vis_hierarki.xsl"******************* ><?xml version="1.0" encoding="utf-8"?> ><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >version="1.0"><xsl:output method="html" encoding="utf-8"/> > <xsl:template match="/"> ><HTML><HEAD> ><LINK REL="stylesheet" HREF="hierarki.css" TYPE="text/css"/> ><SCRIPT language="JavaScript" FOR="eSwapper" event="onclick"> > event.cancelBubble = true; > oDiv = event.srcElement.parentElement; > if (!oDiv.all.item("eIndlaeg")) return; > var strValue = (oDiv.children[3].style.display == "none" ? >"block" : "none"); > oDiv.children[0].src = (strValue == "none" ? "plus.gif" : >"minus.gif"); > for (var i=3; i!=oDiv.children.length; i++) { > oDiv.children[i].style.display = strValue; > } > </SCRIPT></HEAD> > <BODY> ><SPAN CLASS="overskrift">Lys og Lampe AS's forslagkasse</SPAN><BR/> ><SPAN CLASS="tekst">Some text </SPAN> > <BR/><BR/> > <xsl:apply-templates select="/document/indlaeg" /> > <BR/><BR/> ><SPAN CLASS="tekst">Some text </SPAN> > </BODY></HTML> > </xsl:template> > <xsl:template match="indlaeg"> ><DIV Id="eIndlaeg"> ><xsl:attribute name="class">indryk<xsl:value-of >select="count(ancestor::*)" /></xsl:attribute> ><IMG SRC="minus.gif" ID="eSwapper" /> > <A> ><xsl:attribute name="href">vis_indlaeg.asp?indlaegid=<xsl:value-of >select="@id" /></xsl:attribute> ><xsl:value-of select="overskrift" /> > </A> ><SPAN CLASS="info">[<xsl:value-of select="oprettetaf" />, ><xsl:value-of select="tidspunkt" /> ]</SPAN> ><xsl:apply-templates select="indlaeg" /> > </DIV> > </xsl:template> ></xsl:stylesheet> >*********************"vis_indlaeg.asp"**************** ><SCRIPT LANGUAGE="JSCRIPT" RUNAT="SERVER"> >var oSource = Server.CreateObject("MSXML2.DOMDocument.3.0"); >oSource.async = false; >oSource.load(Server.MapPath("hierarki.xml")); > >var oStylesheet = Server.CreateObject("MSXML2.DOMDocument.3.0"); >oStylesheet.async = false; >oStylesheet.load(Server.MapPath("til_html_vis_indlaeg.xsl")); > >var oVisElement = oSource.createNode (1, "visindlaeg", ""); >oVisElement.text = Request("indlaegid"); >oSource.documentElement.appendChild(oVisElement); > >oSource.transformNodeToObject (oStylesheet, Response); ></SCRIPT> >****************** >regards >Jakob
Disclaimer
These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

