In my previous e-mail, I posted question: "How to write information in HTML format on a popup window called from XSLT" and I got some response to solve that problem. In addition to this problem, I would like to ask two more questions relating to the display XML data in a popup window called from a XSLT. As previously described, in order to display data in the popup window, 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 statement, I passed values of FIELDXMLTAG and FIELDDDN to the function. In case I want to display 20 fields in the popup window, I must pass 20 values of XML fields to the function. It is cumbersome; therfore we need to have a way to directly gain access to XML fields without passing their values. Here are the questions:
1) I think we can use the statement like this : document.all. style.display ... but I don't know how and the exact format of the statement. Can you base on my code mentioned earlier to give me an example so that my XSLT statement is shortened as follows:
<td><a><xsl:attribute name="href">Javascript
opUpWindow</a></td>
2) "Eval" function is a powerful function of Javascript. I knew very little about this function. Can anyone explain its use.
Thank you for your help.
adhp
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 statement, I passed values of FIELDXMLTAG and FIELDDDN to the function. In case I want to display 20 fields in the popup window, I must pass 20 values of XML fields to the function. It is cumbersome; therfore we need to have a way to directly gain access to XML fields without passing their values. Here are the questions:
1) I think we can use the statement like this : document.all. style.display ... but I don't know how and the exact format of the statement. Can you base on my code mentioned earlier to give me an example so that my XSLT statement is shortened as follows:
<td><a><xsl:attribute name="href">Javascript
2) "Eval" function is a powerful function of Javascript. I knew very little about this function. Can anyone explain its use.
Thank you for your help.
adhp