Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 3rd, 2012, 07:57 AM
Authorized User
 
Join Date: Feb 2008
Posts: 12
Thanks: 1
Thanked 0 Times in 0 Posts
Default Hyperlink to replace text

Hello All,

I have some anchor tags in my webpage like
<a href="www.mysite.com/mylink" Id="ID">click here</a>

I have a drop down on the webpage with values like 'yes' or 'no'

If I select "yes" from dropdown the anchor tag should be replaced with static text like "Thank you for clicking"

if I select "no" again text should be replace with hyperlink

Thanks
__________________
tq98
 
Old October 3rd, 2012, 08:16 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

The conventional way of doing this is with Javascript. The way to write the Javascript is off-topic for this forum. Once you know what Javascript you need, your XSLT needs to generate an HTML page that invokes the Javascript at the appropriate points.

There is a new way of doing this if you want to do it all in XSLT: the Saxon-CE product provides XSLT 2.0 running in the browser, with the ability to handle user interface events using XSLT template rules. You will find some demontrations of this on the Saxonica web site.
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
 
Old October 3rd, 2012, 08:36 AM
Authorized User
 
Join Date: Feb 2008
Posts: 12
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Can we have any javascript forum thread in wrox.com?
__________________
tq98





Similar Threads
Thread Thread Starter Forum Replies Last Post
ow to replace text or insert text into bookmarks in a word template aroshlakshan C# 4.0 aka C# 2010 General Discussion 0 April 28th, 2012 03:11 AM
dynamic text for hyperlink goldenstate ASP.NET 2.0 Basics 0 February 28th, 2007 01:03 PM
Text Replace with XSLT pendyalap XSLT 13 October 1st, 2006 05:51 PM
object vs text hyperlink kritimehrotra Excel VBA 0 August 1st, 2006 08:40 PM
Replace text fragments janise MySQL 5 November 1st, 2004 04:43 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.