I can't get to execute javascripts from CakePHP-Javascript helper. I am trying to call myscript.js from myview.ctp
I have the following code lines to achieve this: In app_controller.php file: var $helpers = array('Html', 'Form', 'Javascript'); In default.ctp file header section: <?php e($javascript->link('prototype.js')); ?> <?php e($scripts_for_layout); ?> In myview.ctp file <?php e($javascript->link('listinvoices', false)); ?> Firebug reports for both files a "syntax error" on line 1. Line 1 has the document declaration <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> I checked on the web and the declaration seems to be ok. When I try to read my js files content from Firebug debug panel all I get is a web page stating "Missing Controller ... JcController could not be found" I looked the web for the error message and found articles saying it is caused by missing .js files being called. Firebug reports the called .js files are under localhost/cake/js. I checked and both .js called are physically under C:\Inetpub\wwwroot \cake\webroot\js. Even though all my calls to views and actions work, I checked my environment variables and they seem to be Ok. [Root] => C:\Inetpub\wwwroot\cake\app\ [App] => Is empty, Do I need to assign it a value? [Www_Root] => C:\Inetpub\wwwroot\cake\app\webroot\ ) I tried to include the absolute path in the javascript helper link. Instead of <?php e($javascript->link('prototype')); ?> I wrote <?php e($javascript->link('/cake/webroot/js/prototype')); ?> It did not worked. I thought maybe it was an access right problem. I checked and the js folder has Read and "Execute Scripts only" permission and is allowed to be accessed by the IUSR_VIRTUAL-TGM user. Can anybody help me with this? I am developing from a MS Virtual Machine with the following set up: Host: MS Vista Ultimate 64 bits SP 1. Virtual Machine: OS : Windows XP Pro SP 3 build 2600 http Server : IIS 5.1 with CGI/FastCGI API PHP : 5.2.6 Cake : 1.2.18004 I am using Mod_rewrite.dll. My Mod_rewrite.ini file says: Debug 0 Reload 5000 RewriteCond HTTP_HOST localhost RewriteRule ^/cake/?$ /cake/index.php?REQUEST_URI=index.php [L] RewriteRule ^(/cake/.*)$ /cake/index.php?REQUEST_URI=$1 [L] Sergio Torres --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---