Using Javascript in XSLT

wxdqz

New Member
Not sure if this is possible because I am quite new to XML and XSLT, but I have the following code:

<td style="font-family:Arial, Helvetica, sans-serif; font-size:smaller;"><xsl:apply-templates />
<a>
<xsl:attribute name="href">EditRequirements.asp?mode=deletedetail&doc=<xsl:value-of select="field[@id='url']/field_value" /></xsl:attribute>
Delete this record
</a>
</td>

This file references an xml file, and all of this gets called from an .asp file. When the user clicks on the "Delete this record" link, the appropriate xml record gets deleted. I wish to insert a javascript "confirm" into this code so I can at least give the user a way to back out. As a test, I can alert() the "<xsl:value-of select="field[@id='url']/field_value" />" and get the correct value for the record, but I also need to append the URL "EditRequirements.asp?mode=deletedetail&doc=" on to the front of the record value. This way, I can (theoretically!) call the URL from the javascript code when the user clicks "OK", and do nothing when they click "Cancel".

Am I on the right track here? Thanks in advance!

Paul
 
Back
Top