My name is Edward Tanguay. I'm an American software and web developer living and working in Berlin, Germany.
JQUERY CODE EXAMPLE created on Sunday, May 02, 2010 permalink
How to load and display the contents of a text file with AJAX/Jquery
This example shows allows the user to click a button which loads and displays the contents of a text file (via proxy on the same domain).
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
<html xmlns="">
        <script type="text/javascript"
        <script type="text/javascript">
            google.load("jquery", "1.4.2");
            google.setOnLoadCallback(function() {
            function loadDataFromExernalWebsite() {
                var currentDomain = document.domain;
                $('#content').load('http://' + currentDomain + '/web/getdata/index.php?url=');
        <style type="text/css">
            .contentArea {
            background-color: #eee;
            padding: 10px;
    <p>Click the button to load content:</p>
    <input id="loadButton" type="button" value="load content"/>
    <pre id="content" class="contentArea">...</pre>
need markup?