Ajax demo - fetch server file

Demo of Javascript fetching information from server in the background in response to user actions, without reloading the page.

Uses jQuery.

The resources used (must be on same server as JS) will be:


Update area:

Data will go here.
  

These dump the content into the div as if it is HTML and so it becomes one big paragraph.


(pre tag)

This gets the content and surrounds it with the <pre> tag - which respects its linebreaks.