diff options
| author | kdam0 <kumar.damani@mail.utoronto.ca> | 2017-04-15 02:26:18 +0000 |
|---|---|---|
| committer | kdam0 <kumar.damani@mail.utoronto.ca> | 2017-04-15 02:26:18 +0000 |
| commit | 60a53ac331e33cab3173a6803dcf11de3ff47ae6 (patch) | |
| tree | e972da6b41e91bde064c8827f150f399759b6bca /assets | |
| parent | c06a7af55e7a40abc6eb12fff56851c6512e32c7 (diff) | |
fixed form submt on home page
Diffstat (limited to 'assets')
| -rw-r--r-- | assets/js/home_page.js | 10 |
1 files changed, 10 insertions, 0 deletions
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 |
