Link to home
Start Free TrialLog in
Avatar of mkarthik415
mkarthik415

asked on

how to call javascript with more than one parameter in xsl file and parameter are the xml taag values

how to call javascript with more than one parameter in xsl file and parameter are the xml taag values
<?xml version="1.0" ?> 
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" version="2.0"> 
<channel> 
          <title>Assurance</title> 
          <link>gmail.com</link> 
           <description>ess Alert</description> 
             <item> 
                           <userID>_b</userID> 
               <item>
<channel>
 
above is the xml file
-------------------------------------------------------------
<a class="buttonGo" href="#">
<xsl:attribute name="onclick">
<xsl:value-of select="'javascript:getControls('"/>
<xsl:value-of select="link"/>
<xsl:value-of select="');'"/>
</xsl:attribute></a>
 
I am using this function  in the html how can i pass one more parameter to the above function like' title' from the xml.
 
abve is the xsl code
 
------------------------------------------
function getControls(link,title)
{
}
code in the html

Open in new window

Avatar of Gertone (Geert Bormans)
Gertone (Geert Bormans)
Flag of Belgium image

<a class="buttonGo" href="#">
<xsl:attribute name="onclick">
<xsl:value-of select="'javascript:getControls('"/>
<xsl:value-of select="link"/>
<xsl:text>','</xsl:text>
<xsl:value-of select="title"/>
<xsl:value-of select="');'"/>
</xsl:attribute></a>
Avatar of mkarthik415
mkarthik415

ASKER

what would be the below code for two parameter, Thank you in advance

<xsl:value-of select="'javascript:getControls(&quot;'"/>
<xsl:value-of select="link"/>
<xsl:value-of select="'&quot;);'"/>
ASKER CERTIFIED SOLUTION
Avatar of Gertone (Geert Bormans)
Gertone (Geert Bormans)
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial