So i created a custom button in the toolbar of my joomla-administration component. I want it to do something in the background but NOT to redirect to another page. Unfortunately, it always redirects to another page when i press it, no matter if i declare a $this->setRedirect
-statement or if i dont.
My custom toolbar-button:
JToolBarHelper::custom('mymail.send', 'mymail_send.png', 'mymail_send.png', 'Send', false);
which calls the function
public function send()
{
// does something, but is not supposed to redirect
}
if i call $this->setRedirect($myurl)
within the function it will follow the $myurl correctly. If i dont call it, it redirects to an empty page.
What can I do to prevent the page from redirecting (or reloading) at all?