Yii Framework Forum: Open Url In A New Windows - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Open Url In A New Windows Open URL in a new windows using $this->redirect Rate Topic: -----

#1 User is offline   maggi 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 14
  • Joined: 30-November 11

Posted 06 December 2012 - 01:58 PM

I have the following code in the controller action
$this->redirect(Yii::app()->baseUrl."/aaa/test.php?statusLine=$_GET[statusLine]&User_id=$user_id");


this works fine.

but I want this to be opened in a new window (target=blank)

Any help is appreciated.
0

#2 User is offline   Keith 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 1,562
  • Joined: 04-March 10
  • Location:UK

Posted 07 December 2012 - 06:11 AM

You need to handle this on the client's browser, not the server.

Assuming that you're posting a form, you could send the original request over ajax, capture the result and open a new window pointing at the relevant URL.

What is the purpose of the new window / tab exactly?
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users