views:

55

answers:

1

Hi there, 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

A: 

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!

Ying