From 1aeb9bb244874b1137364c46c292a166d7b6e40a Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Thu, 29 Feb 2024 16:35:09 +0300 Subject: Fix URI to query --- gn2/wqflask/static/new/javascript/auth/search_mrna.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gn2/wqflask/static/new/javascript') diff --git a/gn2/wqflask/static/new/javascript/auth/search_mrna.js b/gn2/wqflask/static/new/javascript/auth/search_mrna.js index 3eca4ed2..76b2dc6b 100644 --- a/gn2/wqflask/static/new/javascript/auth/search_mrna.js +++ b/gn2/wqflask/static/new/javascript/auth/search_mrna.js @@ -10,6 +10,7 @@ function toggle_link_button() { } function search_mrna() { + form = document.getElementById("txt-query").form; query = document.getElementById("txt-query").value; selected = JSON.parse(document.getElementById( "tbl-link").getAttribute("data-datasets")); @@ -18,7 +19,7 @@ function search_mrna() { search_table = new TableDataSource( "#tbl-search", "data-datasets", search_checkbox); $.ajax( - search_endpoint, + form.action, { "method": "POST", "contentType": "application/json; charset=utf-8", @@ -29,7 +30,7 @@ function search_mrna() { "dataset_type": "mrna", "species_name": species_name}), "error": function(jqXHR, textStatus, errorThrown) { - error_data = jqXHR.responseJSON + error_data = jqXHR.responseJSON; console.debug("ERROR_DATA:", error_data); elt = document.getElementById("search-error").setAttribute( "style", "display: block;"); -- cgit v1.2.3