Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2009-05-11
3
Medium Priority
?
398 Views
Last Modified: 2013-11-18
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

0
Comment
Question by:mkarthik415
  • 2
3 Comments
 
LVL 60

Expert Comment

by:Geert Bormans
ID: 24361486
<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>
0
 

Author Comment

by:mkarthik415
ID: 24365997
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;);'"/>
0
 
LVL 60

Accepted Solution

by:
Geert Bormans earned 2000 total points
ID: 24366075
you are making it so unnecessary difficult by using value-of for string values

<xsl:text>javascript:getControls('</xsl:text>
<xsl:value-of select="link"/>
<xsl:text>','</xsl:text>
<xsl:value-of select="title"/>
<xsl:text>');</xsl:text>

0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
Suggested Courses

824 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question