I'm currently doing my first steps with webdevelopment, using html, php and Javascript. I've setup a apache2 server opn my locale machine, and the php part ist working fine. I've also tried to habe some javascript on my website (a google maps-map using the maps-api), but it is not shown on the website. I've searched for this problem, and it seems, that I have to enable javascript first for apache. How do I do this? is there just a config file to edit, or do I need to install some kind of plugin?
Thanks for your help in advance! Tim
I'm currently doing my first steps with webdevelopment, using html, php and Javascript. I've setup a apache2 server opn my locale machine, and the php part ist working fine. I've also tried to habe some javascript on my website (a google maps-map using the maps-api), but it is not shown on the website. I've searched for this problem, and it seems, that I have to enable javascript first for apache. How do I do this? is there just a config file to edit, or do I need to install some kind of plugin?
Thanks for your help in advance! Tim
Share Improve this question asked Aug 12, 2017 at 13:21 TimTim 711 gold badge1 silver badge7 bronze badges 3- 4 Javascript runs on the client and has nothing to do with the web server. If your javascript doesn't work, then you need to debug your javascript code. – M. Eriksson Commented Aug 12, 2017 at 13:22
- You need to check your console log in the browser (f12) to see if there is an error for js. – James Brown Commented Aug 12, 2017 at 13:26
- okay, thanks, I will check this – Tim Commented Aug 12, 2017 at 13:29
2 Answers
Reset to default 3If it's javascript to be run in the clients browser, you don't have to install or enable anything on the server. The client needs javascript enabled in his browser (which is the default for most modern browsers).
This is probably the case. First of all, make sure your JavaScript code is between javascript anchors (<script type='text/javascript'>
and </script>
). Then, access your website in Chrome. If things are not working correctly, use Ctrl+Shift+I (or Cmd+Alt+I on macOS) to view the Chrome console where you might find more information on (potential) errors.
If it's javascript to be run on the server, you probably need Node.js.
Ah, I've found the issue... I just was not calling my javascript function.... I'm sorry, this was a fail on my side....
BUt thanks anyways!