Hi everyone, please help!!!
In order to display data in a popup window coded in a XSLT stylesheet, I created a javascript function, called PopupWindow(xmlTag, ddnnum) as follows:
function PopUpWindow(xmlTag,ddnnum)
{
ExtraWin = window.open("", "_blank", config='width=500,height=300,left=200,top=150');
ExtraWin.document.write("DDN Number : " + ddnnum + "<br></br>"
;
ExtraWin.document.write("XML Tag : " + xmlTag);
}
And the XSLT statement to evoke this function as follows:
<td><a><xsl:attribute name="href">Javascript
opUpWindow("<xsl:value-of select="FIELDXMLTAG"/>",<xsl:value-of select="FIELDDDN"/>)</xsl:attribute><xsl:value-of select="FIELDDDN"/></a></td>
In this XSLT statement, I passed values of FIELDXMLTAG and FIELDDDN to the function. In case I want to display 20 fields or more in the popup window, I must pass 20 values or more of XML fields to the function. It is cumbersome; therefore we need to have a way to directly reference XML fields from the "popupwindow" Javascript function without receiving values passed from the XSLT calling statement. Anybody knows how to do it so that the XSLT calling statement doesn't need to pass values to shorten the statement as follows:
<td><a><xsl:attribute name="href">Javascript
opUpWindow()</a></td>
Thank you.
In order to display data in a popup window coded in a XSLT stylesheet, I created a javascript function, called PopupWindow(xmlTag, ddnnum) as follows:
function PopUpWindow(xmlTag,ddnnum)
{
ExtraWin = window.open("", "_blank", config='width=500,height=300,left=200,top=150');
ExtraWin.document.write("DDN Number : " + ddnnum + "<br></br>"
ExtraWin.document.write("XML Tag : " + xmlTag);
}
And the XSLT statement to evoke this function as follows:
<td><a><xsl:attribute name="href">Javascript
In this XSLT statement, I passed values of FIELDXMLTAG and FIELDDDN to the function. In case I want to display 20 fields or more in the popup window, I must pass 20 values or more of XML fields to the function. It is cumbersome; therefore we need to have a way to directly reference XML fields from the "popupwindow" Javascript function without receiving values passed from the XSLT calling statement. Anybody knows how to do it so that the XSLT calling statement doesn't need to pass values to shorten the statement as follows:
<td><a><xsl:attribute name="href">Javascript
Thank you.