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:
Refresh partial from onclick() javascript
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
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:
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?
Hi Bendik
You can use surface controllers for returning the partial view with data in your Umbraco solution.
Thanks,
Alex
Thanks a lot guys! I figured out that I also need to pass a model from the controller action. Hence
and then in the controller
is working on a reply...