From bc75078a0bb6aa2b2185d6b22742676975f79d55 Mon Sep 17 00:00:00 2001 From: admin Date: Thu, 12 Feb 2015 15:34:54 +0530 Subject: ajax - url changed --- gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/event_details.html | 9 +++++++-- gnowsys-ndf/gnowsys_ndf/ndf/urls/ajax-urls.py | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'gnowsys-ndf/gnowsys_ndf/ndf') diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/event_details.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/event_details.html index bda0255c..de4274f4 100644 --- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/event_details.html +++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/event_details.html @@ -913,6 +913,7 @@ if (!(Status_attended)) if(Event_attended_by !="") { + var success_data = "" $.ajax({ url: url, type: "POST", @@ -925,8 +926,12 @@ if (!(Status_attended)) Event:eventid, csrfmiddlewaretoken: '{{ csrf_token }}'}, success: function(data){ - alert(data) - controler() + success_data = data; + }, + complete:function() + { + alert(success_data); + controler(); } }); } diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/urls/ajax-urls.py b/gnowsys-ndf/gnowsys_ndf/ndf/urls/ajax-urls.py index a3d1badc..cc00c175 100644 --- a/gnowsys-ndf/gnowsys_ndf/ndf/urls/ajax-urls.py +++ b/gnowsys-ndf/gnowsys_ndf/ndf/urls/ajax-urls.py @@ -63,7 +63,7 @@ urlpatterns = patterns('gnowsys_ndf.ndf.views.ajax_views', url(r'^set_enrollment_code/', 'set_enrollment_code', name='set_enrollment_code'), url(r'^get_students_assignments/', 'get_students_assignments', name='get_students_assignments'), url(r'^get_course_details_for_trainer/', 'get_course_details_for_trainer', name='get_course_details_for_trainer'), - url(r'^/(?P[\w-]+)$', 'event_assginee', name='event_assginee'), + url(r'^event_assginee/(?P[\w-]+)$', 'event_assginee', name='event_assginee'), url(r'^save_csv/(?P[\w-]+)$', 'save_csv', name='save_csv'), url(r'^assessment/(?P[\w-]+)$','get_assessment',name='get_assessment'), url(r'^edit_task_title/', 'edit_task_title', name='edit_task_title'), -- cgit v1.2.3-70-g09d2