<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> | |
<head> | |
<title>Hello Jayrock and Dojo</title> | |
<!-- Basic Jayrock --> | |
<script type="text/javascript" src="js/json.js"></script> | |
<script type="text/javascript" src="helloworld.ashx?proxy"></script> | |
<script type="text/javascript"> | |
window.onload = function() | |
{ | |
var s = new HelloWorld(); | |
alert("sync:" + s.greetings()); | |
s.greetings(function(response) { | |
alert("async:" + response.result) | |
}); | |
} | |
</script> | |
<!-- Basic Dojo --> | |
<script language="javascript" src="js/dojo/dojo.js"></script> | |
<script language="javascript"> | |
dojo.require("dojo.event.*"); | |
dojo.require("dojo.widget.*"); | |
dojo.require("dojo.widget.Button"); | |
function helloPressed() | |
{ | |
alert('You pressed the button'); | |
} | |
function helloInit() | |
{ | |
var helloButton = dojo.widget.byId('helloButton'); | |
dojo.event.connect(helloButton, 'onClick', 'helloPressed') | |
} | |
dojo.addOnLoad(helloInit); | |
</script> | |
</head> | |
<body> | |
<p>This page combines the Jayrock and Dojo Hello World examples.</p> | |
<p><button id="helloButton" class="dojo-Button">Hello World!</button></p> | |
</body> | |
</html> | |