Enable Javascript on apache2

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

3

2 Answers

If 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.

2

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!

2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like