diff options
author | maheshgudi | 2017-11-23 12:59:25 +0530 |
---|---|---|
committer | maheshgudi | 2017-11-23 12:59:25 +0530 |
commit | c5469243a3357a030af0047dac90ae8fbbb77e85 (patch) | |
tree | bbcb8081d760f635be1342a838596f6375580ee7 /yaksh/static | |
parent | ae4e2dad126535cda41a7b4a05fdb247f9cdf737 (diff) | |
download | online_test-c5469243a3357a030af0047dac90ae8fbbb77e85.tar.gz online_test-c5469243a3357a030af0047dac90ae8fbbb77e85.tar.bz2 online_test-c5469243a3357a030af0047dac90ae8fbbb77e85.zip |
Minor changes in requesthandler.js
Diffstat (limited to 'yaksh/static')
-rw-r--r-- | yaksh/static/yaksh/js/requesthandler.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/yaksh/static/yaksh/js/requesthandler.js b/yaksh/static/yaksh/js/requesthandler.js index 5d72241..9421317 100644 --- a/yaksh/static/yaksh/js/requesthandler.js +++ b/yaksh/static/yaksh/js/requesthandler.js @@ -61,9 +61,14 @@ function response_handler(method_type, content_type, data, uid){ } else{ unlock_screen(); + // var notify = document.getElementById("notification"); + if ($("#notification")){ + $("#notification").toggle(); + } + var error_output = document.getElementById("error_panel"); error_output.innerHTML = res.error; - focus_on_error(); + focus_on_error(error_output); } } else { reset_values(); @@ -71,8 +76,7 @@ function response_handler(method_type, content_type, data, uid){ } } -function focus_on_error(){ - var ele = document.getElementById('error_panel') +function focus_on_error(ele){ if (ele) { ele.scrollIntoView(true); window.scrollBy(0, -15); |