Dr. Mark Humphrys

School of Computing. Dublin City University.

Home      Blog      Teaching      Research      Contact

Search:

CA216      CA249      CA318

CA400      CA651      CA668


Lab - Ajax


  1. Base it on the Minimal size demo of JavaScript calling a server-side program in background.
  2. You will get this working on student.computing.dcu.ie
  3. Copy my HTML to a HTML file in your public_html.
  4. Copy my JS to a JS file in your public_html.
  5. The URL of your HTML file will be something like: http://student.computing.dcu.ie/~userid/file.html

  6. Edit a new PHP file in your public_html. This will be the server-side program it calls.
  7. The URL of your PHP program will be something like: http://student.computing.dcu.ie/~userid/prog.php

  8. Change the JS from calling my CGI program on www.computing.dcu.ie to calling your PHP program on student.computing.dcu.ie
    • Note in the JS how you should remove the "http://server" part of the URL. This is Same origin policy. (In fact, depending on browser, leaving "http://server" in may work, but only if same-origin.)
    • Your PHP program does something (anything) with the argument.
    • Run PHP with arguments

  9. Get it working on student.computing.dcu.ie



Feeds      w2mind.org

On Internet since 1987.