I've got a question, currently I am using xsl (because I'm in a stylesheet)
and I'm escaping a " character from the text. I'm then passing in that text
into a javascript function as a parameter. But when I call the function,
the replaced quotes are not present
<xsl:variable name="char">"</xsl:variable>
<xsl:variable name="replace">&quot;</xsl:variable>
<xsl:variable name="text" select="People/Description"/>
<a href="javascript:void(0);" onclick="javascript:caller('<xsl:value-of select="str:Replace($text, $char , $replace)"/>');
function caller(text){
alert(text);
text2 = text + "is this your description";
document.getElementById('h6').innerHTML = '<a href="javascript:void(0);" onclick="otherTime(\'' + text2 + '\'); return false;">Click here</a>'
}
even if I just pass text to the otherTime function it wont dispaly with the " charcter.
Is there a way to add it in using regexp. Not sure how to use it.
thanks
and I'm escaping a " character from the text. I'm then passing in that text
into a javascript function as a parameter. But when I call the function,
the replaced quotes are not present
<xsl:variable name="char">"</xsl:variable>
<xsl:variable name="replace">&quot;</xsl:variable>
<xsl:variable name="text" select="People/Description"/>
<a href="javascript:void(0);" onclick="javascript:caller('<xsl:value-of select="str:Replace($text, $char , $replace)"/>');
function caller(text){
alert(text);
text2 = text + "is this your description";
document.getElementById('h6').innerHTML = '<a href="javascript:void(0);" onclick="otherTime(\'' + text2 + '\'); return false;">Click here</a>'
}
even if I just pass text to the otherTime function it wont dispaly with the " charcter.
Is there a way to add it in using regexp. Not sure how to use it.
thanks