diff --git a/INFO-1208 (PHP)/Labs/Lab 2/Lab2.png b/INFO-1208 (PHP)/Labs/Lab 2/Lab2.png index 955992e..31f0ea5 100644 Binary files a/INFO-1208 (PHP)/Labs/Lab 2/Lab2.png and b/INFO-1208 (PHP)/Labs/Lab 2/Lab2.png differ diff --git a/INFO-1208 (PHP)/Labs/Lab 2/info1208-lab2-l_mclean215318.zip b/INFO-1208 (PHP)/Labs/Lab 2/info1208-lab2-l_mclean215318.zip deleted file mode 100644 index 7bad9c8..0000000 Binary files a/INFO-1208 (PHP)/Labs/Lab 2/info1208-lab2-l_mclean215318.zip and /dev/null differ diff --git a/INFO-1208 (PHP)/Labs/Lab 2/l_mclean215318_week2.php b/INFO-1208 (PHP)/Labs/Lab 2/l_mclean215318_week2.php index 192b654..a054efd 100644 --- a/INFO-1208 (PHP)/Labs/Lab 2/l_mclean215318_week2.php +++ b/INFO-1208 (PHP)/Labs/Lab 2/l_mclean215318_week2.php @@ -1,17 +1,24 @@ - + + Levi McLean Lab 2 + + + "); -echo("This is PHP.
"); -echo("This is the first string " . "this is the second string " . "this is my last string
"); -echo("We are in the month of " . date("F") . "
"); -echo("The value in the query string for my_var is " . $_REQUEST['my_var'] . "
"); -echo("My favorite flavour of ice cream is " . $favorite_ice_cream . "
"); -echo("My dog is a " . $dog_type . "
"); -echo("My dog is a " . $dog_type . "
"); -echo ERROR_MSG; -?> \ No newline at end of file + echo("Hello World!
"); + echo("This is PHP.
"); + echo("This is the first string " . "this is the second string " . "this is my last string
"); + echo("We are in the month of " . date("F") . "
"); + echo("The value in the query string for my_var is " . $_REQUEST['my_var'] . "
"); + echo("My favorite flavour of ice cream is " . $favorite_ice_cream . "
"); + echo("My dog is a " . $dog_type . "
"); + echo("My dog is a " . $dog_type . "
"); + echo ERROR_MSG; + ?> + + \ No newline at end of file diff --git a/INFO-1208 (PHP)/Labs/Lab 2/l_mclean215318_week2.zip b/INFO-1208 (PHP)/Labs/Lab 2/l_mclean215318_week2.zip new file mode 100644 index 0000000..6dd86a8 Binary files /dev/null and b/INFO-1208 (PHP)/Labs/Lab 2/l_mclean215318_week2.zip differ diff --git a/INFO-1208 (PHP)/Notes/week2.php b/INFO-1208 (PHP)/Notes/week2.php new file mode 100644 index 0000000..62c5ddb --- /dev/null +++ b/INFO-1208 (PHP)/Notes/week2.php @@ -0,0 +1,62 @@ + + + Week 2 Notes + + + Hello $name

"); + + $name = "Batman"; + echo("

Hello $name

"); + print_r($name); + + echo "1231\"\"2321"; + + phpinfo(); + + $int = 1; + + $float = 1.0; + + $seasons = [ + "Winter", + "Spring", + "Summer", + "Fall", + ]; + + $years = [1, 2, 3, 4, 5]; + + $_SERVER = "Bob"; + ?> + + \ No newline at end of file diff --git a/INFO-3168 (JS 2)/Labs/Lab 2/Levi_Lab2.html b/INFO-3168 (JS 2)/Labs/Lab 2/Levi_Lab2.html new file mode 100644 index 0000000..7288830 --- /dev/null +++ b/INFO-3168 (JS 2)/Labs/Lab 2/Levi_Lab2.html @@ -0,0 +1,33 @@ + + + Levi Lab #2 + + + + + + \ No newline at end of file diff --git a/INFO-3168 (JS 2)/Notes/Constructors/Constructors1.html b/INFO-3168 (JS 2)/Notes/Constructors/Constructors1.html new file mode 100644 index 0000000..3110da6 --- /dev/null +++ b/INFO-3168 (JS 2)/Notes/Constructors/Constructors1.html @@ -0,0 +1,42 @@ + + + + Constructors + + + + + + diff --git a/INFO-3168 (JS 2)/Notes/Constructors/Constructors2.html b/INFO-3168 (JS 2)/Notes/Constructors/Constructors2.html new file mode 100644 index 0000000..b0438e2 --- /dev/null +++ b/INFO-3168 (JS 2)/Notes/Constructors/Constructors2.html @@ -0,0 +1,54 @@ + + + + Constructors (Array of Objects) + + + + + + diff --git a/INFO-3168 (JS 2)/Notes/FlightObjectExamples/FlightObject1.html b/INFO-3168 (JS 2)/Notes/FlightObjectExamples/FlightObject1.html new file mode 100644 index 0000000..d580daf --- /dev/null +++ b/INFO-3168 (JS 2)/Notes/FlightObjectExamples/FlightObject1.html @@ -0,0 +1,25 @@ + + + Simple Object Example + + + + + + \ No newline at end of file diff --git a/INFO-3168 (JS 2)/Notes/FlightObjectExamples/FlightObject2.html b/INFO-3168 (JS 2)/Notes/FlightObjectExamples/FlightObject2.html new file mode 100644 index 0000000..65a688a --- /dev/null +++ b/INFO-3168 (JS 2)/Notes/FlightObjectExamples/FlightObject2.html @@ -0,0 +1,39 @@ + + + Simple Object Example + + + + + + \ No newline at end of file diff --git a/INFO-3168 (JS 2)/Notes/Methods/Methods1.html b/INFO-3168 (JS 2)/Notes/Methods/Methods1.html new file mode 100644 index 0000000..df08afb --- /dev/null +++ b/INFO-3168 (JS 2)/Notes/Methods/Methods1.html @@ -0,0 +1,59 @@ + + + + Methods + + + + + + diff --git a/INFO-3168 (JS 2)/Notes/Methods/Methods2.html b/INFO-3168 (JS 2)/Notes/Methods/Methods2.html new file mode 100644 index 0000000..6a233e4 --- /dev/null +++ b/INFO-3168 (JS 2)/Notes/Methods/Methods2.html @@ -0,0 +1,65 @@ + + + + Methods + + + + + + diff --git a/INFO-3168 (JS 2)/Notes/Week3SampleCode/Week3SampleCode/ajax_info.txt b/INFO-3168 (JS 2)/Notes/Week3SampleCode/Week3SampleCode/ajax_info.txt new file mode 100644 index 0000000..5ab2f8a --- /dev/null +++ b/INFO-3168 (JS 2)/Notes/Week3SampleCode/Week3SampleCode/ajax_info.txt @@ -0,0 +1 @@ +Hello \ No newline at end of file diff --git a/INFO-3168 (JS 2)/Notes/Week3SampleCode/Week3SampleCode/index.html b/INFO-3168 (JS 2)/Notes/Week3SampleCode/Week3SampleCode/index.html new file mode 100644 index 0000000..68e475d --- /dev/null +++ b/INFO-3168 (JS 2)/Notes/Week3SampleCode/Week3SampleCode/index.html @@ -0,0 +1,23 @@ + + + + +
+

The XMLHttpRequest Object

+ +
+ + + + + diff --git a/INFO-3168 (JS 2)/Notes/WikiDemo31/WikiDemo3.css b/INFO-3168 (JS 2)/Notes/WikiDemo31/WikiDemo3.css new file mode 100644 index 0000000..74676a7 --- /dev/null +++ b/INFO-3168 (JS 2)/Notes/WikiDemo31/WikiDemo3.css @@ -0,0 +1,28 @@ +body { + background-color:ButtonFace; +} +.txtBox { + font-family: Verdana, Arial, Helvetica; + font-size: 9pt; + color: black; + height: 19px; + background-color: white; + border: 1px solid #07A2FE; +} +.divClass { + font-family: Verdana, Arial, Helvetica; + font-size: 9pt; + padding: 3px; + color: black; + background-color: white; + width: 500px; + border: 1px solid #07A2FE; + visibility: hidden; +} +.btnButton { + font-family: Verdana, Arial, Helvetica; + font-size: 8pt; + color: black; + height: 24px; + cursor: pointer; +} \ No newline at end of file diff --git a/INFO-3168 (JS 2)/Notes/WikiDemo31/WikiDemo3.html b/INFO-3168 (JS 2)/Notes/WikiDemo31/WikiDemo3.html new file mode 100644 index 0000000..56c1218 --- /dev/null +++ b/INFO-3168 (JS 2)/Notes/WikiDemo31/WikiDemo3.html @@ -0,0 +1,14 @@ + + + Wikipedia Demo 3 (external .js and .css) + + + + + +

+ +

+

+ + \ No newline at end of file diff --git a/INFO-3168 (JS 2)/Notes/WikiDemo31/WikiDemo3.js b/INFO-3168 (JS 2)/Notes/WikiDemo31/WikiDemo3.js new file mode 100644 index 0000000..9257e3c --- /dev/null +++ b/INFO-3168 (JS 2)/Notes/WikiDemo31/WikiDemo3.js @@ -0,0 +1,55 @@ +const ISOK = 200; +var request = new XMLHttpRequest(); + +function getJSONAsync(searchArg) { + if (searchArg == "") { + alert("Enter valid search argument"); + return; + } + + // use an anonymous function as the event handler + request.onload = function() { + if (request.status === ISOK) { + var jsObject = JSON.parse(request.responseText); + var countResults = jsObject.query.search.length; + var template = '_title

'; + + // clear div container + document.getElementById("outputDiv").innerHTML = ""; + + if (countResults > 0) { + for (var i = 0; i < countResults; i++) { + var link = "https://en.wikipedia.org/?curid=" + jsObject.query.search[i].pageid; + var titleText = template.replace("_url", link); + titleText = i + 1 + ". " + titleText.replace("_title", jsObject.query.search[i].title); + document.getElementById("outputDiv").innerHTML += titleText; + + var snipText = jsObject.query.search[i].snippet + "...

"; + document.getElementById("outputDiv").innerHTML += snipText; + document.getElementById("outputDiv").style.visibility = "visible"; + } + } + } + }; + + var url = "https://en.wikipedia.org/w/api.php?action=query&list=search&prop=info&inprop=url&utf8=&format=json&origin=*&srlimit=20&srsearch=" + searchArg; + request.open("GET", url, true); + request.send(); +} + +function callBack() { + +} + +function doSearch() { + var searchArg = document.getElementById("txtSearch").value; + getJSONAsync(searchArg); + +} + +function filterText() { + if (window.event.keyCode === 13) { + document.getElementById("outputDiv").style.visibility = "hidden"; + doSearch(); + } +} \ No newline at end of file diff --git a/INFO-3168 (JS 2)/Notes/simple_ajax/async_ajax.html b/INFO-3168 (JS 2)/Notes/simple_ajax/async_ajax.html new file mode 100644 index 0000000..74005a3 --- /dev/null +++ b/INFO-3168 (JS 2)/Notes/simple_ajax/async_ajax.html @@ -0,0 +1,50 @@ + + + ASynchronous AJAX + + + + + +
+ +
+ + + \ No newline at end of file diff --git a/INFO-3168 (JS 2)/Notes/simple_ajax/sync_ajax.html b/INFO-3168 (JS 2)/Notes/simple_ajax/sync_ajax.html new file mode 100644 index 0000000..f3bba45 --- /dev/null +++ b/INFO-3168 (JS 2)/Notes/simple_ajax/sync_ajax.html @@ -0,0 +1,40 @@ + + + Synchronous AJAX + + + + + +
+ +
+ + + \ No newline at end of file diff --git a/INFO-3168 (JS 2)/Practice/apitest.html b/INFO-3168 (JS 2)/Practice/apitest.html new file mode 100644 index 0000000..52aa440 --- /dev/null +++ b/INFO-3168 (JS 2)/Practice/apitest.html @@ -0,0 +1,14 @@ + + + + Api Test + + + + + + \ No newline at end of file