Reloading page in $.post 'done' callback not working

9 views
Skip to first unread message

Dave Ekhaus

unread,
Oct 21, 2015, 2:11:05 AM10/21/15
to Ruby on Rails: Talk

Hi All.  


Within the 'success' callback of a $.post call - I'm trying to reload the current page (here's a pastie -> http://pastie.org/10496733)


My 'post' call works and now I'd like to refresh the page.  Please help.  (I realize that refreshing the page is not ideal - but its a very 'light' page :-) ).  


Thx Dave

Walter Lee Davis

unread,
Oct 21, 2015, 7:47:01 AM10/21/15
to rubyonra...@googlegroups.com
If you have a call to set the location, followed by a location.reload, what URL do you suppose the second one will use? Try commenting out that reload, and see if it works then.

Walter
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
> To post to this group, send email to rubyonra...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/f272ac33-ab09-4bc3-bf2b-64931e5d1099%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Frederick Cheung

unread,
Oct 21, 2015, 12:26:49 PM10/21/15
to Ruby on Rails: Talk
Have you checked the value of response.status ? I thought those were http status codes rather than strings 

Fred
Reply all
Reply to author
Forward
0 new messages