Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
ajax call done
- Loading branch information
Showing
7 changed files
with
54 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
var base = "http://phonebk.develop.digitalmediauconn.org/phonebook.php"; | ||
|
||
function getAllPeople() { | ||
var ajaxcall = new XMLHttpRequest(); | ||
|
||
ajaxcall.onreadystatechange = function () { | ||
|
||
if (ajaxcall.readyState == 4 && ajaxcall.status == 200) { | ||
|
||
document.querySelector(targetSelector).innerHTML = ajaxcall.responseText; | ||
|
||
|
||
} | ||
|
||
} | ||
|
||
ajaxcall.open("GET", base + "?do=getAllPeople", true); | ||
ajaxcall.send(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
|
||
body { | ||
padding: 30px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut justo elit, cursus sed cursus sit amet, condimentum in sem. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Aenean quis laoreet tellus. Sed hendrerit lectus non gravida congue. Donec auctor semper quam, eu elementum ex efficitur in. Sed vel elit elit. Fusce egestas neque non augue pulvinar, eget facilisis orci pharetra. In sed dictum quam, non auctor libero. Proin facilisis commodo nibh, at aliquam ligula venenatis ut. Vivamus nisi turpis, lacinia ut erat in, venenatis euismod magna. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
function getMessage(targetSelector, targetURL) { | ||
var ajaxcall = new XMLHttpRequest(); | ||
|
||
ajaxcall.onreadystatechange = function () { | ||
|
||
if (ajaxcall.readyState == 4 && ajaxcall.status == 200) { | ||
|
||
document.querySelector(targetSelector).innerHTML = ajaxcall.responseText; | ||
|
||
|
||
} | ||
|
||
} | ||
|
||
ajaxcall.open("GET", targetURL, true); | ||
ajaxcall.send(); | ||
} | ||
getMessage("#page_title", "title.txt"); | ||
getMessage("#page_tagline", "tagline.txt"); | ||
getMessage("#page_description", "description.txt"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Good ol' lorem ipsum |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Potens Nominis |