diff --git a/v1/js/searchBar.js b/v1/js/searchBar.js
new file mode 100644
index 0000000..47d323f
--- /dev/null
+++ b/v1/js/searchBar.js
@@ -0,0 +1,56 @@
+var button = document.getElementById("btnSearch");
+
+button.onclick = function () {
+ var text = document.getElementById("link_id").value;
+ console.log(text);
+ queryTMDB(text);
+}
+
+function queryTMDB(query) {
+ var data = "{}";
+
+ var xhr = new XMLHttpRequest();
+ xhr.withCredentials = true;
+
+ xhr.addEventListener("readystatechange", function () {
+ if (this.readyState === this.DONE) {
+ var display = document.getElementById("display");
+ var jsonObj = JSON.parse(this.responseText);
+ console.log(jsonObj.movies);
+
+ Object.keys(jsonObj.movies).forEach(function(key) {
+ var id = jsonObj.movies[key].id;
+ var title = jsonObj.movies[key].title;
+
+ var posterURL = jsonObj.movies[key].poster_path;
+ if (posterURL != null)
+ var poster_path = "http://image.tmdb.org/t/p/w500"+jsonObj.movies[key].poster_path;
+ else
+ var poster_path = "image_nf.svg";
+
+ var node = document.createElement("li"); // Create a
node
+ var imageNode = document.createElement('img');
+ var textNode = document.createTextNode(title); // Create a text node
+ var buttonNode = document.createElement("span");
+ var button2Node = document.createElement("span");
+ buttonNode.innerHTML = '';
+ button2Node.innerHTML = '';
+
+ imageNode.src = poster_path;
+
+ node.appendChild(textNode); // Append the text to
+ node.appendChild(imageNode);
+ node.appendChild(buttonNode);
+ node.appendChild(button2Node);
+
+ display.appendChild(node);
+
+ });
+ }
+ });
+
+ xhr.open("GET", "http://localhost:63590/api/v1/plex/request?query="+query);
+
+ console.log(data);
+ xhr.send(data);
+}
\ No newline at end of file
diff --git a/v1/searchBar.js b/v1/searchBar.js
new file mode 100644
index 0000000..e42a6fd
--- /dev/null
+++ b/v1/searchBar.js
@@ -0,0 +1,56 @@
+var button = document.getElementById("btnSearch");
+
+button.onclick = function () {
+ var text = document.getElementById("link_id").value;
+ console.log(text);
+ queryTMDB(text);
+}
+
+function queryTMDB(query) {
+ var data = "{}";
+
+ var xhr = new XMLHttpRequest();
+ xhr.withCredentials = true;
+
+ xhr.addEventListener("readystatechange", function () {
+ if (this.readyState === this.DONE) {
+ var display = document.getElementById("display");
+ var jsonObj = JSON.parse(this.responseText);
+ console.log(jsonObj.movies);
+
+ Object.keys(jsonObj.movies).forEach(function(key) {
+ var id = jsonObj.movies[key].id;
+ var title = jsonObj.movies[key].title;
+
+ var posterURL = jsonObj.movies[key].poster_path;
+ if (posterURL != null)
+ var poster_path = "http://image.tmdb.org/t/p/w500"+jsonObj.movies[key].poster_path;
+ else
+ var poster_path = "../images/image_nf.svg";
+
+ var node = document.createElement("li"); // Create a node
+ var imageNode = document.createElement('img');
+ var textNode = document.createTextNode(title); // Create a text node
+ var buttonNode = document.createElement("span");
+ var button2Node = document.createElement("span");
+ buttonNode.innerHTML = '';
+ button2Node.innerHTML = '';
+
+ imageNode.src = poster_path;
+
+ node.appendChild(textNode); // Append the text to
+ node.appendChild(imageNode);
+ node.appendChild(buttonNode);
+ node.appendChild(button2Node);
+
+ display.appendChild(node);
+
+ });
+ }
+ });
+
+ xhr.open("GET", "http://localhost:63590/api/v1/plex/request?query="+query);
+
+ console.log(data);
+ xhr.send(data);
+}
\ No newline at end of file
diff --git a/v1/searchDisplay.html b/v1/searchDisplay.html
index 901ad72..794f798 100644
--- a/v1/searchDisplay.html
+++ b/v1/searchDisplay.html
@@ -9,58 +9,6 @@