hi Oscar, I think maybe it over some ajaxsetup({cache:false}) prevention when doing replaceWith. I have solve the problem by using ".html" instead of ".replaceWith".
Thank you for your help. very appreciate it . Regards, MH On Sat, May 5, 2012 at 2:01 PM, Oscar Mederos <omede...@gmail.com> wrote: > Hello Min, > > On Saturday, May 5, 2012, 1:36:24 PM, you wrote: > > > hi oscar, > > > it works, but the problem in jquery load didn't refresh the page after I > have loaded. > > it will always use the outdated html. I have tried to use ajaxsetup > cache:false etc. > > but seems like once it loaded. if form return validation error, even we > have close > > and call jquery load again. it will still static and show the last > validation error. > > > how you solve this issue? seems like more to javascript itself . > > I'm not sure why it isn't modifying the page correctly, because the > following line should do it: > > $("#my-form").replaceWith(data.message); > > - Are you sure the form isn't being validated in the server-side? > - Are you sure the request is being made to the server? (maybe an error > occurs on the client-side and the request is never made). > - Could you show us the entire code you are using? > > I suggest you doing two things: > 1) Load the page, and before submitting the form, store the source > code of the page. Then store it again once you submit it, so that you > can compare both source codes. > 2) Debug that jQuery code either with Chrome's Developer Tools, or > Firebug for Firefox. > > > Regards, > > MH > > > -- > Oscar Mederos > omede...@gmail.com > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > 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. > > -- You received this message because you are subscribed to the Google Groups "Django users" group. 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.