Hi all, i have been learning about javascript and using dojo. I am trying to execute a php file with dojo. My code is
dojo.xhrGet({
url: 'helloworld.php',
load: testCallback,
error: testError,
content: {name: dojo.byId('name').value}
});
for the dojo function. The php file is basically a simple script that prints the value of whats being passed in through xhrGet
<?php
header('Content-type: text/plain');
print "Hello {$_GET['name']}\n";
?>
When I call this function, I get the php file displayed as text. My testCallback function is simply
function testCallback(data, ioArgs)
{
alert("in testCallback");
alert(data);
}
I cant think why this wont work as it was pulled from the dojo tutorial itself. I tested php with a file with phpinfo() in it, and it was working. Does php have to be configured to 'work' with certain ports?