Newbite Q' help understanding the use of Ajax

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chazzy69
    New Member
    • Sep 2007
    • 196

    #1

    Newbite Q' help understanding the use of Ajax

    Never had any expereience with Ajax before today, what im trying to find out how it differs from javascript for example what would be the Ajax version of -

    Code:
    <script type="text/javascript">
    document.write("Hello World!");
    </script>
    I'v also heard Ajax makes it possible to execute javascript code inside a .php script on the servers side.

    Another question i had is say i echo'd some javascript in a .php file, now say that .php file was only run using a cron job i.e. it has No User Sided Browser Intereaction at ALL would the javascript/Ajax script work?

    Any help in understanding would great, thanks in advance.
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    Originally posted by chazzy69
    Never had any expereience with Ajax before today, what im trying to find out how it differs from javascript for example what would be the Ajax version of -

    Code:
    <script type="text/javascript">
    document.write("Hello World!");
    </script>
    as the example would take up too much space, kindly refer to this AJAX tutorial.


    I'v also heard Ajax makes it possible to execute javascript code inside a .php script on the servers side.
    no.

    to run JavaScript, you need an appropriate environment. PHP doesn’t provide one.

    Another question i had is say i echo'd some javascript in a .php file, now say that .php file was only run using a cron job i.e. it has No User Sided Browser Intereaction at ALL would the javascript/Ajax script work?
    no. AJAX is all about client-server communication (nothing more, nothing less).

    Comment

    • chazzy69
      New Member
      • Sep 2007
      • 196

      #3
      Thanks for the info and clearing up the .php matter for me.

      Comment

      Working...