blob: 855e644b17e775b1d0f2fdb7e58adcb97b5a3c1a [file] [log] [blame]
<title>Binding Test</title>
<script language="JavaScript">
function setup() {
if (location.hostname == 'tests' || location.hostname == 'localhost')
alert('This page can only be run from tests or localhost.');
// Disable all elements.
var elements = document.getElementById("form").elements;
for (var i = 0, element; element = elements[i++]; ) {
element.disabled = true;
// Send a query to the browser process.
function sendMessage() {
// Results in a call to the OnQuery method in
request: 'BindingTest:' + document.getElementById("message").value,
onSuccess: function(response) {
document.getElementById('result').value = 'Response: '+response;
onFailure: function(error_code, error_message) {}
<body bgcolor="white" onload="setup()">
<form id="form">
Message: <input type="text" id="message" value="My Message">
<br/><input type="button" onclick="sendMessage();" value="Send Message">
<br/>You should see the reverse of your message below:
<br/><textarea rows="10" cols="40" id="result"></textarea>