Posted By:
justin_s
Posted On:
Monday, April 23, 2007 04:11 PM
i am trying to use ajax to send a request to the page that it's on, and have it return text. i simply want a link that you click and it will ask the page using GET, page.php?test1=asd, and then for a div to display "asd", or whatever the php outputs. I followed several tutorials and cannot seem to find the answer! i would greatly appreciate your help. here is what i have so far: JAVASCRIPT/AJAX CODE: } ]]> HTML CODE: testd test PHP CODE: <?php if($_GET['test1']) { //echo "test1a"; return "tes
More>>
i am trying to use ajax to send a request to the page that it's on, and have it return text.
i simply want a link that you click and it will ask the page using GET, page.php?test1=asd, and then for a div to display "asd", or whatever the php outputs.
I followed several tutorials and cannot seem to find the answer! i would greatly appreciate your help.
here is what i have so far:
JAVASCRIPT/AJAX CODE:
}
]]>
HTML CODE:
testd
test
PHP CODE:
<?php
if($_GET['test1']) {
//echo "test1a";
return "test1b";
}
?>
Help would be appreciated!
<<Less