How to redirect in new tab in browser ?

40 views
Skip to first unread message

Claudio Luna

unread,
Nov 29, 2014, 9:14:11 AM11/29/14
to agile-too...@googlegroups.com
In a form : 
                           if ($f->isSubmitted())
                                {
                                   $p->js(true)->univ()->redirect('veopdff', array(
                                        'var1' => $var1,
                                        'var2' => $var2,
                                        'var3' => $var3,
                                        'var4' => $var4))->execute(); 

                                } 
this execute fine but in the same tab, how to execute in new tab ?
Thanks

Liviu

unread,
Dec 5, 2014, 5:13:48 AM12/5/14
to agile-too...@googlegroups.com
You should use newWindow():

$p->js()->univ()->newWindow($this->api->url('veopdff', array(

                                       
'var1' => $var1,
                                       
'var2' => $var2,
                                       
'var3' => $var3,
                                       
                                       
'var4' => $var4)
), '_blank'
)->execute();



It will open new tab in Firefox, new window in Chrome.

For more documentation: http://book.agiletoolkit.org/js/univ.html

Daniel Tosello

unread,
Dec 7, 2014, 7:18:51 PM12/7/14
to agile-too...@googlegroups.com
It's probably also worth pointing out that the js can be seen here if you want to see how it works: https://github.com/atk4/atk4/blob/master/templates/js/atk4_univ.js
Reply all
Reply to author
Forward
0 new messages