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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to gain direct accesss to XML fields to display them in a window

Status
Not open for further replies.

adhp55555

Programmer
Oct 24, 2003
9
US
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(&quot;DDN Number : &quot; + ddnnum + &quot;<br></br>&quot;);
ExtraWin.document.write(&quot;XML Tag : &quot; + xmlTag);
}

And the XSLT statement to evoke this function as follows:
<td><a><xsl:attribute name=&quot;href&quot;>Javascript:popUpWindow(&quot;<xsl:value-of select=&quot;FIELDXMLTAG&quot;/>&quot;,<xsl:value-of select=&quot;FIELDDDN&quot;/>)</xsl:attribute><xsl:value-of select=&quot;FIELDDDN&quot;/></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=&quot;href&quot;>Javascript:popUpWindow</a></td>

2) &quot;Eval&quot; 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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top