I have a image on my page. I want to pin it to Pinterest. I also want that after pin, the page should redirect to my website page. How i will do it, please suggest me. I am using the following code.
<script type="text/javascript">
(function (d) {
var f = d.getElementsByTagName('SCRIPT')[0], p = d.createElement('SCRIPT');
p.type = 'text/javascript';
p.async = true;
p.src = '//assets.pinterest.com/js/pinit.js';
f.parentNode.insertBefore(p, f);
} (document));
</script>
<div style=" float:left; width:30px;position:relative; top:45px;left:12px;"><a href="//www.pinterest.com/pin/create/button/?url=<%=strPintURL%>&media=<%=strPintImage%>&description=Girls%20Room%3A%20Image" data-pin-do="buttonPin" data-pin-config="above"><img src="//assets.pinterest.com/images/pidgets/pinit_fg_en_rect_gray_20.png" /></a>
<script type="text/javascript" async src="//assets.pinterest.com/js/pinit.js"></script></div>
strPath = HttpContext.Current.Request.Url.AbsoluteUri;
strPintURL = strPath.Replace("http://", "http%3A%2F%2F");
strPintImage = "http%3A%2F%2Fmywebsite.com/images/AJKids/GirlsRoom/" + dataTable.Rows[CurrentPage]["Image"].ToString();
public string strPintURL, strPintImage;