Using window.open() in controller in cakephp

Hi,

I am trying to use javascript’s window.open() method in my controller in one of my applications in cakephp, i need to use this method in controller only, because my pop-up links are directly created in controller.

Currently i am trying this:

$data[$day] = ‘<a href=“#” onclick="window.open(“pms/index.php/Events/view_event/ ’ . $v[‘Event’][‘id’] . '”,“mywindow”,“menubar=1,resizable=1,width=350,height=250”);
">’ . $v[‘Event’][‘name’] . ‘</a>’

but it gives me a syntax error.

Can anyone suggest what is the right way of achieving this, any help will be highly appreciated:).

Thanks in advance!!!
Kul.

$data[$day] = '<a href="#" onclick="window.open(\\'pms/index.php/Events/view_event/' . $v['Event']['id'] .'\\',\\'mywindow\\',\\'menubar=1,resizable=1,width=350,height=250\\');">' . $v['Event']['name'] . '</a>';

Thanks a lot for the reply, i had traced the same error, and rectified it earlier, was the same error as u’ve told.

But again thanks a lot for replying.

Kul.