From: W. Trevor King Date: Wed, 13 Oct 2010 21:26:04 +0000 (-0400) Subject: Add AJAX example from old code/ pages. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=38042f6e85cc1a4ff73b80eb43f146cf225d8def;p=mw2txt.git Add AJAX example from old code/ pages. --- diff --git a/ikiwiki.setup b/ikiwiki.setup index 9982a47..8f9dcb3 100644 --- a/ikiwiki.setup +++ b/ikiwiki.setup @@ -29,7 +29,7 @@ use IkiWiki::Setup::Standard { # rcs backend to use rcs => 'git', # plugins to add to the default configuration - add_plugins => [qw{goodstuff linktoimgonly lockedit mdwn_itex org sidebar}], + add_plugins => [qw{goodstuff linktoimgonly lockedit mdwn_itex org sidebar rawhtml}], # plugins to disable disable_plugins => [qw{editpage passwordauth smiley}], # location of template files diff --git a/posts/AJAX.mdwn b/posts/AJAX.mdwn new file mode 100644 index 0000000..301a262 --- /dev/null +++ b/posts/AJAX.mdwn @@ -0,0 +1,21 @@ +[[!meta title="AJAX"]] +[[!meta date="2009-09-19 16:27:00"]] + +[AJAX][] is a web-buzzword that I had always thought must be more +complicated than it really is. I finally got a chance to look into it +and write up a simple [[example]]. The example + +[[!inline pagenames="example" template="raw" feeds="no"]] + +accesses the server-side + +[[!inline pagenames="data.xml" template="raw" feeds="no"]] + +via + +[[!inline pagenames="lookup.php" template="raw" feeds="no"]] + +[AJAX]: http://en.wikipedia.org/wiki/Ajax_(programming) + +[[!tag tags/programming]] +[[!tag tags/web]] diff --git a/posts/AJAX/data.xml b/posts/AJAX/data.xml new file mode 100644 index 0000000..19069db --- /dev/null +++ b/posts/AJAX/data.xml @@ -0,0 +1,11 @@ + + + + ping + A common dummy word for testing functionality. + + + dummy + One word seemed too silly... + + diff --git a/posts/AJAX/example.html b/posts/AJAX/example.html new file mode 100644 index 0000000..d69980b --- /dev/null +++ b/posts/AJAX/example.html @@ -0,0 +1,49 @@ + + + + + + + +
+

+ Word:
+ +

+
+
+ + diff --git a/posts/AJAX/lookup.php b/posts/AJAX/lookup.php new file mode 100644 index 0000000..e8c0472 --- /dev/null +++ b/posts/AJAX/lookup.php @@ -0,0 +1,23 @@ +word == $word) { + $ret .= ''.$entry->definition.''; + // this doesn't even have to be XML, but for official "AJAX" + break; + } +} +if (strlen($ret) == 0) { + $ret .= ''.$word.' not found'; +} +echo ''; +echo $ret; + +?>