How to use bitcoin price as place holder in php?

0 votes

I am loading the current bitcoin price to my webpage using:

var auto_refresh = setInterval(

     function()

     {$('.btc-price').load('gox.php');}, 10000);

I can get the current price to display with:

<div class="btc-price"></div>

Now, I want to use the price as a 'placeholder' in an input field:


<input placeholder="[current bitcoin price here]" />

But it does not work. How to do this?

Aug 21, 2018 in Blockchain by slayer
• 29,040 points
24 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

You can do it by providing an id to your input field and then set the attribute placeholder through jquery.

Example:

var auto_refresh = setInterval(

     function()

     {$.get('gox.php', function (data) {

          $("#inputid").attr('placeholder', data);

     });}, 10000);
answered Aug 21, 2018 by digger
• 27,620 points

Related Questions In Blockchain

0 votes
1 answer

How to create Bitcoin Address in PHP?

You need to understand that Bitcoin address and ...READ MORE

answered Aug 27, 2018 in Blockchain by Perry
• 16,450 points
256 views
0 votes
1 answer

How to use real world/live data in my smart contract?

You cant access/embed real world data using ...READ MORE

answered Jul 12, 2018 in Blockchain by digger
• 27,620 points
43 views
0 votes
1 answer

How to add Bitcoin as currency for my website?

You cannot use BTC as the currency ...READ MORE

answered Aug 17, 2018 in Blockchain by slayer
• 29,040 points
26 views
0 votes
1 answer

Protocols used in a distributed/dlt system for the nodes to establish communication

yes all are over TCP/IP connections secured by TLS encryption in hashgraph architecture-hashgraph, ...READ MORE

answered Aug 6, 2018 in Blockchain by ariaholic
• 7,320 points
42 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
62 views
0 votes
1 answer
0 votes
1 answer

How i can use nodejs to watch transactions in bitcoin network?

you can use  const Socket = require('blockchain.info/Socket'); const mySocket ...READ MORE

answered Jul 9, 2018 in Blockchain by digger
• 27,620 points
25 views
0 votes
2 answers

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.