I have a button that executes a function in a solidity contract like this:
<a href="#" onclick="solidityFunction()" class="btn btn-primary btn-block">Execute Function</a>
The solidityFunction()
might take one parameter. In the web3 Javascript I have it like the following:
window.solidityFunction = function () {
contract.deployed().then(function (contractInstance) {
contractInstance.solidityFunction({from: web3.eth.accounts[0], gas:1000000, value: web3.toWei(0.01, "ether")})
})
},
How do I pass a parameter from the onclick="solidityFunction()"
that I then use in the window.solidityFunction
part?