diff options
author | Jayaram Pai | 2013-12-09 12:47:18 +0530 |
---|---|---|
committer | Jayaram Pai | 2013-12-09 12:47:18 +0530 |
commit | 0dd964ec05401809a408ab55d5517d3b2fba3a85 (patch) | |
tree | 805c74ea457c551cea557be39d16fb91d42cea9f /static/website/js/custom.js | |
parent | b596364cf3f871887cce519291b684341cc5c014 (diff) | |
download | FOSSEE-Forum-0dd964ec05401809a408ab55d5517d3b2fba3a85.tar.gz FOSSEE-Forum-0dd964ec05401809a408ab55d5517d3b2fba3a85.tar.bz2 FOSSEE-Forum-0dd964ec05401809a408ab55d5517d3b2fba3a85.zip |
reply edit with no ajax
Diffstat (limited to 'static/website/js/custom.js')
-rw-r--r-- | static/website/js/custom.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/static/website/js/custom.js b/static/website/js/custom.js index ef0752e..da5839b 100644 --- a/static/website/js/custom.js +++ b/static/website/js/custom.js @@ -5,6 +5,7 @@ $(document).ready(function() { $second_range = $("#id_second_range"); $category.change(function() { + $("#similar-link").hide(); var category = $(this).val(); $.ajax({ url: "/ajax-tutorials/", @@ -41,6 +42,27 @@ $(document).ready(function() { } }); }); + + $second_range.change(function() { + $.ajax({ + url: "/ajax-similar-questions/", + type: "POST", + data: { + category: $category.val(), + tutorial: $tutorial.val(), + minute_range: $minute_range.val(), + second_range: $second_range.val() + }, + dataType: "html", + success: function(data) { + console.log(data); + $response = $(data); + var similar_count= $response.find("#similar-count").text(); + $("#similar-link").show().html(similar_count); + $(".modal-body").html(data); + } + }); + }); $(document).ajaxStart(function() { $("#ajax-loader").show(); |