From 60a53ac331e33cab3173a6803dcf11de3ff47ae6 Mon Sep 17 00:00:00 2001 From: kdam0 Date: Fri, 14 Apr 2017 22:26:18 -0400 Subject: fixed form submt on home page --- assets/js/home_page.js | 10 ++++++++++ views/index.hbs | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/assets/js/home_page.js b/assets/js/home_page.js index 4c9151a..1bc5ccf 100644 --- a/assets/js/home_page.js +++ b/assets/js/home_page.js @@ -1,4 +1,14 @@ function main(){ + $("#go-button").on('click', function(e) { + e.preventDefault(); + if ($("#drop-down-value").text() == "Courses") { + // $("#search-field").attr("action", "search/courses"); + window.location += 'search/courses?search=' + $("#user-input-course").val(); + } else { + // $("#search-field").attr("action", "search/users"); + window.location += 'search/users?search=' + $("#user-input-users").val(); + } + }); // Search bar drop down scripting (some of it is shared with nav panel // in script.js but this code in this file is exclusive to search bar diff --git a/views/index.hbs b/views/index.hbs index dfb06d3..4d5f3f7 100644 --- a/views/index.hbs +++ b/views/index.hbs @@ -3,7 +3,7 @@
-
+

The solutions to all your problems


-- cgit v1.2.3