Hi!I'm trying to perform an ajax call on the submit of a form. The form will be submitted depending on the call's result. I'm doing sth like that:
$("#myform").submit(function() { var rdatefrom=$('#id_rdatefrom').val(); var arr_sdateText = rdatefrom.split("/"); startday = arr_sdateText[0]; startmonth = arr_sdateText[1]; startyear = arr_sdateText[2]; $.get(""+startday+"/"+startmonth+"/"+startyear+"/")function(data) { msg=data.msg; if(msg!=='None'){ alert(msg); return false;} return true; }); }); but the form is being submitted regardless the call's result while I get the monstrous: Traceback (most recent call last): File "/usr/lib/python2.6/wsgiref/handlers.py", line 94, in run self.finish_response() File "/usr/lib/python2.6/wsgiref/handlers.py", line 135, in finish_response self.write(data) File "/usr/lib/python2.6/wsgiref/handlers.py", line 218, in write self.send_headers() File "/usr/lib/python2.6/wsgiref/handlers.py", line 274, in send_headers self.send_preamble() File "/usr/lib/python2.6/wsgiref/handlers.py", line 200, in send_preamble 'Date: %s\r\n' % format_date_time(time.time()) File "/usr/lib/python2.6/socket.py", line 300, in write self.flush() File "/usr/lib/python2.6/socket.py", line 286, in flush self._sock.sendall(buffer) error: [Errno 32] Broken pipe What's going on? -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/7G1wG2673jQJ. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.