Created
August 6, 2013 22:58
-
-
Save diorahman/6169585 to your computer and use it in GitHub Desktop.
javascript call vala from index.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!doctype html> | |
| <html> | |
| <head> | |
| <title>Hello</title> | |
| </head> | |
| <body> | |
| <div> | |
| <input id="input" value="Kismis"> | |
| <button id="button">Greet!</button> | |
| </div> | |
| <div> | |
| Hello <span id="name"></span> | |
| </div> | |
| <script type="text/javascript"> | |
| var app = new App(); | |
| document.getElementById('button').onclick = function(){ | |
| var creature = { name : document.getElementById('input').value}; | |
| app.hello(creature, function(err, greet){ | |
| var name = document.getElementById('name'); | |
| name.innerText = greet.name; | |
| }) | |
| } | |
| </script> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment