Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
65
rated 0 times [  72] [ 7]  / answers: 1 / hits: 18842  / 14 Years ago, thu, september 9, 2010, 12:00:00

Let's say I have a PHP page and inside that PHP page I just have <?php echo Hello World!; ?> and I want to use JavaScript (preferabbly jQuery) and AJAX to CALL that php page and return it's output (which would be Hello World!)



How is this done?


More From » php

 Answers
20

The data will contain the text from the page, do what you want with it. In this case, set the #responseArea text to contain it.



$.ajax({
url: yourPage.php,
success: function(data){
$(#responseArea).text(data);
}
});

[#95668] Sunday, September 5, 2010, 14 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
gageherberth

Total Points: 249
Total Questions: 115
Total Answers: 119

Location: Liechtenstein
Member since Sun, Sep 12, 2021
3 Years ago
;