[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: How to create client side function in HTML with XS

Subject: Re: How to create client side function in HTML with XSL
From: Rick Taylor <taylor@xxxxxxxx>
Date: Thu, 10 Apr 2003 10:57:01 -0600
client side function
Ilse,

Simply add the onClick attribute and specify the function:

<a href="#" id="{ID}" onClick="myFunction();"><xsl:value-of select="ID"/></a>

you can provide the function by including a js file or putting the code in a script element:

<script type="text/javascript" language="javascript" src="myscript.js">

<script type="text/javascript">

<![CDATA[

   function myFunction()
     {
      alert('this is my function');
     }

   ]]>
  </script>

You might want set href="javascript:void(0)" instead of href="#"

-rick


At 11:25 AM 4/10/03 +0200, you wrote:
I'm new on XSL...

In my XSL file I create a weblink with following code:

<a href="#" id="{ID}"><xsl:value-of select="ID"/></a>

This weblink must have client side code on the "OnClick"-event.
How can I create a client side function for this weblink in XSL?

Thanks.
Ilse






_________________________________________________________________
Ontvang je Hotmail & Messenger berichten op je mobiele telefoon met Hotmail SMS http://www.msn.be/gsm/smsservices



XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list

Rick Taylor XML Developer PPDM Association


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.