Discussions

XML & Web services: How to passed an xsl parameter to a javascript function inside a

  1. 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. [QUOTE] [/QUOTE] I am trying to pass a variable called numberOfRecordsFromDatabase to a javascript function called window.parent.shrinkIFrame(). Is this possible? If not, is there a way to do this. Any hint would be greatly appreciated. Yours, Frustrated.
  2. hi, Please see the following example to pass variable to the JavaScript. Its a simple example. hope this would give you a hint to work on your example. SAMPLE XML ---------- BILL BUCKRAM 234 234 234 234 ANIL AMBANI 234 234 234 234 AMITABH BACHANN 234 234 234 234 RAJESH KHANNA 234 234 234 234 SAMPLE XSL ----------- <script language="JavaScript"> var JSfunction='<xsl:value-of select="./CUSTOMER/NAME"/>'; function foo() { alert(JSfunction); } </script> OUTPUT ------- In this case it would alert for the first name in the List of the XML File.If you want to populate array you can use it by using the tag. hope Iam able to help you. cheers, Sadashiv.