admin管理员组文章数量:1314587
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!
本文标签: phpEnable Javascript on apache2Stack Overflow
版权声明:本文标题:php - Enable Javascript on apache2 - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741963715a2407425.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论