bsc/index.html

30 lines
727 B
HTML
Raw Normal View History

2014-09-30 23:51:53 +03:00
<!doctype>
<html>
<head>
<script type="text/javascript" src="main.js"></script>
2014-09-30 23:51:53 +03:00
<script type="text/javascript">
function registerName() {
var name = document.querySelector("#name").value;
name = eth.fromAscii(name);
2014-10-21 01:14:58 +03:00
eth.transact({to: "NameReg", gas: "10000", gasPrice: eth.gasPrice, data: [eth.fromAscii("register"), name]}).then(function(tx) {
2014-09-30 23:51:53 +03:00
document.querySelector("#result").innerHTML = "Registered name. Please wait for the next block to come through.";
}, function(err) {
console.log(err);
});
}
</script>
</head>
<body>
<h1>std::name_reg</h1>
<input type="text" id="name"></input>
<input type="submit" onClick="registerName();"></input>
<div id="result"></div>
</body>
</html>