Skip to content

Commit

Permalink
ajax action based on the form action (and not hardcoded)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kostas Stamatis committed Jun 20, 2022
1 parent bff7357 commit 2312575
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion interface/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ $(document).ready(function () {
type: $("#type").val(),
n_res: $("#n_res").val()
};
var action = $(this).attr('action');
if($("#broad_entity_search").prop('checked') == true) {
formData.broad_entity_search = "True";
}
Expand All @@ -59,7 +60,7 @@ $(document).ready(function () {

$.ajax({
type: "POST",
url: "query.php",
url: action,
data: formData,
dataType: "html",
encode: true,
Expand Down

0 comments on commit 2312575

Please sign in to comment.