Home Search Member List Faq Register Login  
UltimateSitemap
Re: onClick

Thread Starter: wunderleyg   Started: 04-11-2008 1:09 PM   Replies: 2
 Karamasoft Support Forums » General Discussions » UltimateSitemap » Re: onClick
 Printable Version    « Previous Thread   Next Thread »
  11 Apr 2008, 1:09 PM
wunderleyg is not online. Last active: 10/21/2010 8:16:45 AM wunderleyg

Top 10 Posts
Joined on 04-04-2008
Posts 47
onClick
Is there a way to add onClick, onDoubleClick, etc. events to items in a sitemap?

  
  11 Apr 2008, 1:30 PM
Karamasoft is not online. Last active: 5/8/2018 10:36:45 AM Karamasoft

Top 10 Posts
Joined on 09-05-2004
Posts 6,820
Re: onClick
There is no built-in way to do this but you can wrap your sitemap node titles inside SPAN elements and adding those client-side event handlers to the SPAN elements around your title text. For example, let's say you have a sitemap node which has a title 'Phone Numbers' and you want to add a client-side onclick event handler. You can define your node in your sitemap fiel as follows:

<siteMapNode nodeID="Node3" title="&lt;span onclick=&quot;alert(0);&quot;&gt;Phone Numbers&lt;/span&gt;" url="Apple.aspx" nodePrefix="&amp;nbsp;"></siteMapNode>

Note that ", <, and > characters need to be encoded as above in your sitemap file. However, if you are using the visual sitemap designer (UltimateSitemapDesigner) from inside the Visual Studio, you can just set the Title textbox to the following:

<span onclick="alert(0);">Phone Numbers</span>


  
  11 Apr 2008, 1:34 PM
wunderleyg is not online. Last active: 10/21/2010 8:16:45 AM wunderleyg

Top 10 Posts
Joined on 04-04-2008
Posts 47
Re: onClick
Perfect.  Thank you very much

  
 Page 1 of 1 (3 items)
Karamasoft Support Forums » General Discussions » UltimateSitemap » Re: onClick

You can add attachments
You can post new topics
You can reply to topics
You can delete your posts
You can edit your posts
You can create polls
You can vote in polls
Forum statistics are enabled
Forum is unmoderated

© 2002-2018 Karamasoft LLC. All rights reserved.