I’m rolling a cookie based shopping cart for my Umbraco site. Now, within the partial view, I have buttons that modify the cart cookie directly through javascript. Hence, after a modification has been done, I need to reload. This works fine if I just call
document.location.reload();
in the javascript. However, this causes a major flicker of the whole page, ugly:-( So, I’m looking for a way to only reload the partial. I’ve looked into solutions involving jQuery’s load, so something like this:
$('#thePartialDiv').load('@Url.Action("PartialViewName", "???")');
But, I can’t seem to get the Url.Action right. And I don’t even know if this would be a viable solution for Umbraco.
Anyone?
This is a companion discussion topic for the original entry at https://our.umbraco.com/forum/88466-refresh-partial-from-onclick-javascript