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

How to passed an xsl parameter to a javascript function inside an xsl

Status
Not open for further replies.

jadeite100

Programmer
May 17, 2006
19
CA
Hi:

I am having problem passing an xsl param variable as a parameter to a javascript function inside an
xsl styelsheet.

Here is my xsl stylesheet.

<xsl:param name="numberOfRecordsFromDatabase" select="search-result/rec-num" />
<xsl:template name="Body">
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"
onLoad="cloneHeader();window.parent.shrinkIFrame(<xsl:value-of select='$numberOfRecordsFromDatabase'/>);"
onresize="cloneHeaderResize();window.parent.shrinkIFrame(<xsl:value-of select='$numberOfRecordsFromDatabase'/>);">
</body>
</xsl:template>

I am trying to pass a variable called numberOfRecordsFromDatabase to
a javascript function called window.parent.shrinkIFrame(<xsl:value-of select='$numberOfRecordsFromDatabase'/>).


Is this possible?
If not, is there a way to do this.
Any hint would be greatly appreciated.

Yours,

Frustrated.
 
><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"
onLoad="cloneHeader();window.parent.shrinkIFrame(<xsl:value-of select='$numberOfRecordsFromDatabase'/>);"
onresize="cloneHeaderResize();window.parent.shrinkIFrame(<xsl:value-of select='$numberOfRecordsFromDatabase'/>);">

[tt]
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"
onLoad="cloneHeader();window.parent.shrinkIFrame([red]'{$numberOfRecordsFromDatabase}'[/red]);"
onresize="cloneHeaderResize();window.parent.shrinkIFrame([red]'{$numberOfRecordsFromDatabase}'[/red]);">
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top