Picture jump about CakePHP problems

Point the view: links to List/index.ctp files submitted to the upProj function of the Controller:ListController, after a series of treatment by redirect
$this->redirect(array ("controller"=> "list","action" => "index"));
Jump to the initialization function index function of ListController, and then back to List/index.ctp

Question: List/index.ctp had a link, click on the picture is called popup. Now popup call error. The survey is the popup images of the URL becomes less of a layer.

The following code fragment:


function addWorkPop() {
var answer = window.showModalDialog('../list','','dialogWidth=550px;dialogHeight=250px;','');
window.location = "../list/";

$this->Html->image('/img/add.png'). ' ' .$this->Html->link('Update project', array('controller'=>'list','action'=>'upProj'))

<a href="#" onclick="addWorkPop()">Popup treatment</a>

Finally, the upProj function is to jump:
$this->redirect(array ("controller" => "list","action" => "index"));

Originally, when there is no point [update] link Popup processing is no problem. But click Update Project] after some treatment, then jumps back to app/View/List/index.ctp. But then Popup link does not use, I survey the problem is the URL.

The project name is proj
Click on the [Popup link URL before treatment] is: http://localhost/proj/list/
Now point [update] after the treatment, and then [Popup] link discovery URL into http://localhost/list/

Why URL would be less of a layer, may I ask how to solve. Thank you!

Started by Otto at October 24, 2016 - 10:30 PM

Don't write directly dead path

Posted by Otto at November 01, 2016 - 10:38 PM

You directly from the root directory to write on it.

Posted by Bernie at November 02, 2016 - 11:27 PM