Bitcoin Forum
June 24, 2024, 11:01:46 AM *
News: Voting for pizza day contest
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Wallet software / Re: How to use BitcoinJS in a normal website? (not using node.js or anything) on: August 27, 2014, 03:25:55 PM
Firefox also works fine. As a last ditch effort I can send you bitcoin.min.js if you PM me your email address (as a rule of thumb please be careful when receiving attachment)
2  Bitcoin / Wallet software / Re: How to use BitcoinJS in a normal website? (not using node.js or anything) on: August 27, 2014, 03:07:05 PM
Hmmm... I'm on Windows and it works fine for me. Not really sure what happened. My chrome version is 36.0.1985.143 m on Windows 7
3  Bitcoin / Wallet software / Re: How to use BitcoinJS in a normal website? (not using node.js or anything) on: August 27, 2014, 12:53:13 PM
My 3rd username for this website (I tend to use captcha as part of my password and end up not remembering it later). My bitcoin.min.js is also around 220kb so most likely you are on the right track. Browser choice is important as bitcoinjs doesn't work with older browser (IE <11?) and Android's WebView. I've tried the following code with Chrome:

<!DOCTYPE html>
<html>
<body>

<h1>My First Web Page</h1>

<p id="demo">A Paragraph.</p>

<button type="button" onclick="myFunction()">Try it</button>

<script src="bitcoinjs.min.js"></script>
<script>
function myFunction() {
   key = Bitcoin.ECKey.makeRandom();
    document.getElementById("demo").innerHTML = key.toWIF();
}
</script>

</body>
</html>

Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!