From 3c702523519621a811329c319528f944d00dce0a Mon Sep 17 00:00:00 2001 From: BuildTools Date: Wed, 12 Jun 2019 07:41:31 -0500 Subject: [PATCH] Created Ask Dev Osan framework --- index.html | 4 ++++ sig-ask-devOsan.js | 23 +++++++++++++++++++++++ sig-ask-devosan/index.php | 4 ++++ sig-ask-devosan/popularquestions.php | 3 +++ 4 files changed, 34 insertions(+) create mode 100644 sig-ask-devOsan.js create mode 100644 sig-ask-devosan/index.php create mode 100644 sig-ask-devosan/popularquestions.php diff --git a/index.html b/index.html index a396b57..f2b2743 100644 --- a/index.html +++ b/index.html @@ -199,6 +199,9 @@
Absolutely not, just a desire to hang out with software developers.
+
+ +
@@ -239,5 +242,6 @@ crossorigin="anonymous" > + diff --git a/sig-ask-devOsan.js b/sig-ask-devOsan.js new file mode 100644 index 0000000..ab9fa71 --- /dev/null +++ b/sig-ask-devOsan.js @@ -0,0 +1,23 @@ + +window.onload=init(); + +function init() { + document.getElementsByClassName("sig-ask-devosan")[0].innerHTML=` +

Ask {dev}Osan.

+
+ +
+ `; + var req = new XMLHttpRequest(); + req.onreadystatechange = function() { + if (this.readyState==4 && this.status==200) { + document.getElementsByClassName("sig-ask-devosan-popular")[0].innerHTML=this.responseText; + } + } + req.open("POST","http://45.33.13.215/projects/dev-osan/dev-osan.github.io/sig-ask-devosan/popularquestions.php") + req.send(); + document.getElementsByClassName("sig-ask-devosan-popular")[0].innerHTML=` + Fetch data... + `; +} + diff --git a/sig-ask-devosan/index.php b/sig-ask-devosan/index.php new file mode 100644 index 0000000..e0efbe1 --- /dev/null +++ b/sig-ask-devosan/index.php @@ -0,0 +1,4 @@ +".$_POST['question'].""; +?> \ No newline at end of file diff --git a/sig-ask-devosan/popularquestions.php b/sig-ask-devosan/popularquestions.php new file mode 100644 index 0000000..cfa27a4 --- /dev/null +++ b/sig-ask-devosan/popularquestions.php @@ -0,0 +1,3 @@ + \ No newline at end of file