Re: Cannot execute javascript
Brian, Thank you for your help. I tried to move my cake installation to my root web folder and now everything is working. I guess, in the future, I will examine the subfolder configuration. Thank you again, Sergio On Mar 7, 11:27 am, brian bally.z...@gmail.com wrote: I did receive the email that you sent directly to me. I replied: -- snip -- I guess I'd have to agree with that. But, as I said, I don't have any experience using a subdirectory. I know it can work, though. Check some of the links here: http://www.google.com/search?source=ighl=enrlz=1G1GGLQ_ENUS271=q=... You can probably ignore the Apache alias ones, unless you have access to httpd.conf. Other than that, though, I can't really say which is the best (correct) method to use. -- snip -- Sorry, I don't know of any other solution. On Fri, Mar 6, 2009 at 5:33 PM, SergioTorresC. sergiotorr...@gmail.com wrote: Brian, I have tries twice to send you an answer, but I don't get it published... I said cake is my web_root directory. For examplehttp://localhost/cake/customers/loginis a valid URL in my setup and it is working, so I guess the tag src /cake/js/prototype sgould work, no? On Mar 5, 10:33 am, brian bally.z...@gmail.com wrote: On Thu, Mar 5, 2009 at 12:32 AM, SergioTorresC. sergiotorr...@gmail.com wrote: Brian, Thank you for your answer. You are right, it was a typo. I am not using the extensions when calling the scripts. When I see the view source the links appear like this: script type=text/javascript src=/cake/js/prototype.js/script script type=text/javascript src=/cake/js/listinvoices.js/ script And both files are, indeed, under cake/webroot/js Since my Www_Root variable is C:\Inetpub\wwwroot\cake\app\webroot\ I understand the tags' src is correct, maybe not? No, it should begin with '/js/...' if webroot dir is root. But you mentioned that you'd tried several ways; is this the result of using $javascript-link('prototype')? That should be the correct one. Keep in mind that you should also be able to open the JS file directly in your browser by pointing it to this URL: /js/prototype.js If that works, you'll know that Cake is set up properly for your directory structure. It's a bit confusing in that, when using the link() method, you leave off the initial js directory, as well as the extension. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Cannot execute javascript
Brian, I have tries twice to send you an answer, but I don't get it published... I said cake is my web_root directory. For example http://localhost/cake/customers/login is a valid URL in my setup and it is working, so I guess the tag src /cake/js/prototype sgould work, no? On Mar 5, 10:33 am, brian bally.z...@gmail.com wrote: On Thu, Mar 5, 2009 at 12:32 AM, SergioTorresC. sergiotorr...@gmail.com wrote: Brian, Thank you for your answer. You are right, it was a typo. I am not using the extensions when calling the scripts. When I see the view source the links appear like this: script type=text/javascript src=/cake/js/prototype.js/script script type=text/javascript src=/cake/js/listinvoices.js/ script And both files are, indeed, under cake/webroot/js Since my Www_Root variable is C:\Inetpub\wwwroot\cake\app\webroot\ I understand the tags' src is correct, maybe not? No, it should begin with '/js/...' if webroot dir is root. But you mentioned that you'd tried several ways; is this the result of using $javascript-link('prototype')? That should be the correct one. Keep in mind that you should also be able to open the JS file directly in your browser by pointing it to this URL: /js/prototype.js If that works, you'll know that Cake is set up properly for your directory structure. It's a bit confusing in that, when using the link() method, you leave off the initial js directory, as well as the extension. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Cannot execute javascript
I did receive the email that you sent directly to me. I replied: -- snip -- I guess I'd have to agree with that. But, as I said, I don't have any experience using a subdirectory. I know it can work, though. Check some of the links here: http://www.google.com/search?source=ighl=enrlz=1G1GGLQ_ENUS271=q=cakephp+subdirectoryaq=2oq=cakephp+sub You can probably ignore the Apache alias ones, unless you have access to httpd.conf. Other than that, though, I can't really say which is the best (correct) method to use. -- snip -- Sorry, I don't know of any other solution. On Fri, Mar 6, 2009 at 5:33 PM, SergioTorresC. sergiotorr...@gmail.com wrote: Brian, I have tries twice to send you an answer, but I don't get it published... I said cake is my web_root directory. For example http://localhost/cake/customers/login is a valid URL in my setup and it is working, so I guess the tag src /cake/js/prototype sgould work, no? On Mar 5, 10:33 am, brian bally.z...@gmail.com wrote: On Thu, Mar 5, 2009 at 12:32 AM, SergioTorresC. sergiotorr...@gmail.com wrote: Brian, Thank you for your answer. You are right, it was a typo. I am not using the extensions when calling the scripts. When I see the view source the links appear like this: script type=text/javascript src=/cake/js/prototype.js/script script type=text/javascript src=/cake/js/listinvoices.js/ script And both files are, indeed, under cake/webroot/js Since my Www_Root variable is C:\Inetpub\wwwroot\cake\app\webroot\ I understand the tags' src is correct, maybe not? No, it should begin with '/js/...' if webroot dir is root. But you mentioned that you'd tried several ways; is this the result of using $javascript-link('prototype')? That should be the correct one. Keep in mind that you should also be able to open the JS file directly in your browser by pointing it to this URL: /js/prototype.js If that works, you'll know that Cake is set up properly for your directory structure. It's a bit confusing in that, when using the link() method, you leave off the initial js directory, as well as the extension. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Cannot execute javascript
Brian, Thank you for your answer. You are right, it was a typo. I am not using the extensions when calling the scripts. When I see the view source the links appear like this: script type=text/javascript src=/cake/js/prototype.js/script script type=text/javascript src=/cake/js/listinvoices.js/ script And both files are, indeed, under cake/webroot/js Since my Www_Root variable is C:\Inetpub\wwwroot\cake\app\webroot\ I understand the tags' src is correct, maybe not? On Mar 4, 10:13 pm, brian bally.z...@gmail.com wrote: On Wed, Mar 4, 2009 at 8:09 PM, SergioTorresC. sergiotorr...@gmail.com wrote: ?php e($javascript-link('prototype.js')); ? Is this a typo? I ask because, further on in your mail, you leave out the .js, which is the correct way. Always leave out the extension for both JS CSS files. ?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. This is the same thing I see when the path to a JS file is incorrect. You didn't mention what the script tag's src looks like (when you view source). --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Cannot execute javascript
On Thu, Mar 5, 2009 at 12:32 AM, SergioTorresC. sergiotorr...@gmail.com wrote: Brian, Thank you for your answer. You are right, it was a typo. I am not using the extensions when calling the scripts. When I see the view source the links appear like this: script type=text/javascript src=/cake/js/prototype.js/script script type=text/javascript src=/cake/js/listinvoices.js/ script And both files are, indeed, under cake/webroot/js Since my Www_Root variable is C:\Inetpub\wwwroot\cake\app\webroot\ I understand the tags' src is correct, maybe not? No, it should begin with '/js/...' if webroot dir is root. But you mentioned that you'd tried several ways; is this the result of using $javascript-link('prototype')? That should be the correct one. Keep in mind that you should also be able to open the JS file directly in your browser by pointing it to this URL: /js/prototype.js If that works, you'll know that Cake is set up properly for your directory structure. It's a bit confusing in that, when using the link() method, you leave off the initial js directory, as well as the extension. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Cannot execute javascript
On Wed, Mar 4, 2009 at 8:09 PM, SergioTorresC. sergiotorr...@gmail.com wrote: ?php e($javascript-link('prototype.js')); ? Is this a typo? I ask because, further on in your mail, you leave out the .js, which is the correct way. Always leave out the extension for both JS CSS files. ?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. This is the same thing I see when the path to a JS file is incorrect. You didn't mention what the script tag's src looks like (when you view source). --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---