Reputation: 1990
Im trying out some sample code from a dojo tutorial. I have
<button dojoType="dijit.form.Button" id="helloButton">
Test
<script type="dojo/method" event="onClick">
dojo.xhrGet({
url: 'response.txt',
load: testCallback,
error: testError
});
alert("getting thru");
</script>
</button>
When I click my button, I get my error callback is run, but i cant figure out why.
This is testCallback
function testCallback(data, ioArgs)
{
alert(data);
}
and I have a file called response.txt that is in the same folder as my index.html. I am really puzzled!
Any suggestions??
Thanks
Ying
Upvotes: 1
Views: 181
Reputation: 1990
I rebooted the computer and everything seemed to work. I could not recreate the error, luckily. To recap:
1) set permissions on response.txt
2) make sure port 8000 is open using netstat -an
Thanks for all that chipped in!
Upvotes: 1