I have an xsl file that I need to call a JS function. I need to pass in two variables to this function. A div ID and some content. Here are the variables I need to pass in.
<xsl:value-of select="udt:Name" disable-output-escaping="yes" />
<xsl:value-of select="udt:Driving_x0020_Since" disable-output-escaping="yes" />
<xsl:value-of select="udt:Miles" disable-output-escaping="yes" />
I need to do two things.
1.
I need to pass in a different div name based on the numeric value of the miles element. I'm assuming I can use an xsl chose for that, but how would I create a variable that I set based on the when statement
2.
I need to pass all three xsl variables as some html in the second part of the function. Essentially the xsl would need to output a JS function that looks like this
millionMiles("divIdBasedOnWhenHere", "Name Driving Since Miles"); How do I combine those elements together in this JS function call? Thanks