| 
									
										
										
										
											2014-09-30 22:51:53 +02:00
										 |  |  | <!doctype> | 
					
						
							|  |  |  | <html> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | <head> | 
					
						
							| 
									
										
										
										
											2014-10-21 00:14:41 +02:00
										 |  |  | <script type="text/javascript" src="main.js"></script> | 
					
						
							| 
									
										
										
										
											2014-10-21 00:37:58 +02:00
										 |  |  | <script type="text/javascript" src="websocket.js"></script> | 
					
						
							|  |  |  | <script type="text/javascript" src="qt.js"></script> | 
					
						
							| 
									
										
										
										
											2014-10-28 16:53:31 +01:00
										 |  |  | <script type="text/javascript" src="httprpc.js"></script> | 
					
						
							| 
									
										
										
										
											2014-09-30 22:51:53 +02:00
										 |  |  | <script type="text/javascript"> | 
					
						
							|  |  |  | function registerName() { | 
					
						
							|  |  |  |     var name = document.querySelector("#name").value; | 
					
						
							| 
									
										
										
										
											2014-10-21 00:37:58 +02:00
										 |  |  |     name = web3.fromAscii(name); | 
					
						
							| 
									
										
										
										
											2014-09-30 22:51:53 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-10-21 00:37:58 +02:00
										 |  |  |     var eth = web3.eth; | 
					
						
							|  |  |  |     eth.transact({to: "NameReg", gas: "10000", gasPrice: eth.gasPrice, data: [web3.fromAscii("register"), name]}).then(function(tx) { | 
					
						
							| 
									
										
										
										
											2014-09-30 22:51:53 +02: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> |