As far as I know, unless you specify otherwise a
"JToolBarHelper::back();"-button will add javascript
"javascript:history.back();".
Differently said: if you just add "JToolBarHelper::back();" to your
component admin side and leave all parameters blank, the button should
work, returning to the previous page.
If it doesn't or if it redirects to a page you don't want, just fill
in the parameters: "JToolBarHelper::back('My alternative text to
display', 'index.php?option=com_mycomponent&view=my_view');"...
differently said: give as parameter the URL you want to redirect to.
On Oct 25, 8:39 am, reansey seng <
rean...@gmail.com> wrote:
> But I use in component only. I want to it with JToolBarHelper::back();
>
>
>
> On Mon, Oct 25, 2010 at 1:35 PM, Andy Tolle <
andy.to...@gmail.com> wrote:
> > In your view(template) you include the following code:
> > <input type="hidden" name="referer" value="<?php echo base64_encode(@
> > $_SERVER['HTTP_REFERER']); ?>" />
>
> > In your controller, you add:
> > $referer = JRequest::getString('referer', JURI::base(), 'post');
> > $referer = base64_decode($referer);
> > $this->setRedirect($referer);
>
> > On Oct 25, 8:14 am, reansey <
rean...@gmail.com> wrote:
> > > Hello all!
>
> > > I need to write a back button in one joomla component. Example, when
> > > create new file and then I want to back to the main component page no
> > > need to back to page that I was create. So how do i? Please give some
> > > clue. Thank
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Joomla! General Development" group.
> > To post to this group, send an email to
> >
joomla-de...@googlegroups.com.
> > To unsubscribe from this group, send email to
> >
joomla-dev-gene...@googlegroups.com<
joomla-dev-general%2Bunsu...@googlegroups.com>
> > .