AJAX calls from component


How could I manage in version3, an onSubscribe component’s function to not reload the page in case of successfull subscribe?


I guess you just wanna update a partial instead.

This should help you:

Depends how you’re reloading the page. If you’re doing it server side, just don’t return a redirect from your onSubscribe ajax handler. If you’re doing it client side, such as with javascript using window.location, then don’t do that.

There’s a lot of things you could do instead but it depends on what you want to happen. Tell us that and we’ll be able to help you figure it out. :slight_smile: