Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

href not working

Status
Not open for further replies.

indupriya9

Programmer
Oct 29, 2002
99
NZ
Hi XML gurus

I have a code in XSL that used to work with vbscript function in IE but since vbscript is not supported in firefox, I have changed the function to a javascript function. But now the reference in the XSL doesn't seem to recognise the href.

The XSL code is as follows:

Code:
   <a class='nav1'><xsl:attribute name="href">selected("<xsl:value-of select='rId'/>","<xsl:value-of select='Rn_Descriptor'/>")</xsl:attribute><xsl:value-of select="Rn_Descriptor"/></a>

When I use the above code, on clicking of the href, I get a 404 error.

 
Try this.
[tt]
<a class='nav1'><xsl:attribute name="href"><xsl:text>javascript:selected("</xsl:text><xsl:value-of select='rId'/> <xsl:text>","</xsl:text> <xsl:value-of select='Rn_Descriptor'/> <xsl:text>")</xsl:text> </xsl:attribute><xsl:value-of select="Rn_Descriptor"/></a>
[/tt]
 
Or, more readable:
Code:
<a class='nav1' href='javascript:selected("{rId}","{Rn_Descriptor}")'>
  <xsl:value-of select="Rn_Descriptor"/>
</a>

Jon

"I don't regret this, but I both rue and lament it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top