I am stuck at overriding the default editable bootstrap values in Django framework javascript html page
In my webpage, it coded as below $.fn.editable.defaults.url = "{% url 'page1' model.PATH %}"; Now my requirement is, When I click on a button, it check the views.py(page1, which is default URL) and pass the context through 'return HttpResponse' to html page that "True" or "False" based the value, if false, it should go page2, it never goes to page2 url, its entered to the function conflict_warn() but not inside and eventually it failed with the,Uncaught TypeError:e.getAttribute is not a function I tried number of ways, but all are vain. $(this).editable({ value: "", display: false, success: function (response, newValue) { if (response.hasOwnProperty("State"))){ conflict_warn(response, newValue)//if State value True,should go to other func} else { window.location.href = "{% url 'path1' 'path2'%}" + response;} }, error: function(response, newValue) { $(this).editable("destroy"); } }); $(this).editable("submit"); function conflict_warn(response, newValue) { $(this).editable({ value: "" display: false success: function (response.newvalue) { window.location.href = "{% url 'path1' 'path2'%}" + response; } }); $(this).editable("setValue", "{% url 'page1' model.PATH %}"); $(this).editable("submit");} -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/54a49b08-2559-4ad8-b096-cf851ca6af73%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.