November 3, 2009

Add a DotNetKicks button to your Webpage




DotNetKicks is a popular .NET community based news site. A lot of users use the DotNetKicks social bookmarking button which makes it easier for viewers to submit or ‘kick’ a story. If you have been wondering how to add the DotNetKicks button to every post on your website, here’s the code for it.

<div>
<script type="text/javascript">
document.write('<a href="http://www.dotnetkicks.com/submit?url='+document.location.href+'&amp;title='+document.title+'"> <img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url='+document.location.href+'" border="0"></a>');
</script>
</div>

This piece of code determines the URL using ‘document.location.href’ and the Title using ‘document.title’. This information is submitted to the dotnetkicks site when the user click on the link/image. When this code is placed on a page, the output generated is as shown below:

image



'Like' us on our FaceBook page if you find this blog useful. Thanks!


Did you like this post?
kick it on DotNetKicks.com Save on Delicious
subscribe via rss subscribe via e-mail
print this post follow me on twitter


About The Author

Suprotim Agarwal, ASP.NET Architecture MVP works as an Architect Consultant and provides consultancy on how to design and develop Web applications.

Suprotim is also the founder and primary contributor to DevCurry, DotNetCurry and SQLServerCurry. He has also written an EBook 51 Recipes using jQuery with ASP.NET Controls.

Follow him on twitter @suprotimagarwal

comments

0 Responses to "Add a DotNetKicks button to your Webpage"
 

Copyright © 2009-2012 All Rights Reserved for DevCurry.com by Suprotim Agarwal | Terms and Conditions