Calling a PHP script using ajax

user3122618

hi i am calling a php file using ajax after an interval of time. In my php file i simply echo a text line. But it didnt show me any output after time interval..

here is my ajax code form where i am calling my php file..

<script>

$(document).ready(function() {
    setTimeout(function() {
        $.ajax({
        url: 'process.php',    
        type: 'post',    
        data: {"token": "your_token"}, });   
    }, 5000);
});

</script>

code inside the process.php file

<?php

echo "hello testing";

?>
Abbasi

User the success and error function of ajax. for eg

    $.ajax ({
    url: 'process.php',
    type:'post'
    data:data1,

    success: function (response) {
    //alert response here you will get the value hello testing
    alert (response);
    },

error {
alert ('error');
}

});

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Calling a PHP script using ajax

From Dev

Calling a php script using ajax not working

From Dev

Calling php scripts using ajax

From Dev

Calling a PHP class method using AJAX

From Dev

calling servlet from php page using ajax

From Dev

Calling a php function in a separate file using AJAX

From Dev

Calling a PHP script using FreePBX and Asterisk

From Dev

Simple call to php script using AJAX not working

From Dev

Pass an array to a php script using AJAX

From Dev

Sending Information to a PHP Script using Ajax

From Dev

Using Javascript / Ajax to run a php script

From Dev

Simple call to php script using AJAX not working

From Dev

Sending FileList using Ajax to PHP script

From Dev

Using Ajax and JQuery to call PHP Script

From Dev

AJAX not calling PHP file

From Dev

Calling PHP script with Cordova

From Dev

Calling PHP functions through AJAX using jQuery callback parameters

From Dev

Calling PHP functions through AJAX using jQuery callback parameters

From Dev

Using $.post, $.ajax or AJAX properly in CodeIgniter to call a PHP script

From Dev

Codeigniter : route doesn't work when calling php script through AJAX

From Dev

Ajax is not calling php page for datatable

From Dev

Calling a Python Script from PHP

From Dev

Trouble Using jquery Ajax and a php script to retrieve data from mysql

From Dev

Accessing JSON returned by php script using jquery ajax

From Dev

Using AJAX to execute a PHP script through a JavaScript function

From Dev

Using Ajax to run a php script every X seconds

From Dev

How to do jQuery autocomplete using an AJAX call to a PHP script?

From Dev

How to execute a PHP email script using AJAX? [Current code is not working]

From Dev

Running Python script from PHP by using an AJAX call

Related Related

  1. 1

    Calling a PHP script using ajax

  2. 2

    Calling a php script using ajax not working

  3. 3

    Calling php scripts using ajax

  4. 4

    Calling a PHP class method using AJAX

  5. 5

    calling servlet from php page using ajax

  6. 6

    Calling a php function in a separate file using AJAX

  7. 7

    Calling a PHP script using FreePBX and Asterisk

  8. 8

    Simple call to php script using AJAX not working

  9. 9

    Pass an array to a php script using AJAX

  10. 10

    Sending Information to a PHP Script using Ajax

  11. 11

    Using Javascript / Ajax to run a php script

  12. 12

    Simple call to php script using AJAX not working

  13. 13

    Sending FileList using Ajax to PHP script

  14. 14

    Using Ajax and JQuery to call PHP Script

  15. 15

    AJAX not calling PHP file

  16. 16

    Calling PHP script with Cordova

  17. 17

    Calling PHP functions through AJAX using jQuery callback parameters

  18. 18

    Calling PHP functions through AJAX using jQuery callback parameters

  19. 19

    Using $.post, $.ajax or AJAX properly in CodeIgniter to call a PHP script

  20. 20

    Codeigniter : route doesn't work when calling php script through AJAX

  21. 21

    Ajax is not calling php page for datatable

  22. 22

    Calling a Python Script from PHP

  23. 23

    Trouble Using jquery Ajax and a php script to retrieve data from mysql

  24. 24

    Accessing JSON returned by php script using jquery ajax

  25. 25

    Using AJAX to execute a PHP script through a JavaScript function

  26. 26

    Using Ajax to run a php script every X seconds

  27. 27

    How to do jQuery autocomplete using an AJAX call to a PHP script?

  28. 28

    How to execute a PHP email script using AJAX? [Current code is not working]

  29. 29

    Running Python script from PHP by using an AJAX call

HotTag

Archive