Reputation: 614
In my app I have two different controllers for two different screens of the same app. While in one I want to set a button that drives you to the other one. (Is a mobile app and I want the interaction between two screens).
I am trying:
href='window.open(".CController::createUrl('/mobilechart').")
I generate this code in the initial controller that's why I use php concat, but it's not working. It executes the same controller so I get an error because I don't pass the variables.
It looks like it works (it gets the right url) using:
href='".CController::createUrl('../index.php/mobilechart')."'
but it never charger it keeps like loading info. When I go directly to the new controller view it works perfectly!
How can I do this??
Thank you very much!
Upvotes: 0
Views: 1101
Reputation: 437336
You need to also supply the name of the other controller -- otherwise how can Yii guess which controller you want to redirect to?
href='window.open(".CController::createUrl('mobilechart/index').")
Upvotes: 1