...

View Full Version : Functional IMG Button



unify
11-01-2012, 11:10 PM
Is there anyway to make a button like this in html/javacript

http://i654.photobucket.com/albums/uu265/hoover78/hrfj.png

The button is supposed to function the same way the pinterest "Pin It" button functions.


Here's the code for it:



javascript:void((function(){var%20e=document.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('charset','UTF-8');e.setAttribute('src','http://snatchly-assets-uncompressed.s3.amazonaws.com/scripts/snatchly.bookmarklet.min.js?r='+Math.random()*99999999);document.body.appendChild(e)})());


Your supposed to bookmark this code to be able to pin items from any page. I'm trying to make a clickable button for my website.

Anyone have an idea on how I can go about doing this?

Philip M
11-02-2012, 10:27 AM
Anyone have an idea on how I can go about doing this?




<img src="http://i654.photobucket.com/albums/uu265/hoover78/hrfj.png" border="0" alt="" onclick = "go()"/>

<script type = "text/javascript">

function go() {
javascript:void((function(){var%20e=document.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('charset','UTF-8');e.setAttribute('src','http://snatchly-assets-uncompressed.s3.amazonaws.com/scripts/snatchly.bookmarklet.min.js?r='+Math.random()*99999999);document.body.appendChild(e)})());
}
</script>


Quizmaster: What measurement is equal to 6,076 feet?
Contestant: A yard.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum