Working with javascript in Wamp

What is WAMP?

WAMP is a server that is hosted on you machine it stands for  windows apache , mysql and php . There are a variety of amp stacks out there including those for Linux and Mac. I use WAMP for web development because it is free and easy to install. It is possible to install these application manual on your own but I like to make things easy for myself. I recently been having trouble with make javascript work in WAMP and I just figured out the solution. It is not pointing to the right directory.

My page for the website is in the subdirectory simple

wamptutorial_1

Here are all of my files in the subdirectory.

wamptutorial_2

When I click on index.html it just shows an empty page. Notice that it is pointing to the C: drive an not the local host. We will need to change the directory so it will be pointing to the host server.

wamptutorial_3

In the example below I change the directory so it now points to the server localhost.

wamptutorial_4

And now my program works. Yay!!!!

Resources:

What is Wamp: https://www.youtube.com/watch?v=iG7cj-TwUGI

To download wamp: http://www.wampserver.com/en/

More in depth tutorial in using Wamp: http://www.howtogeek.com/177129/beginner-geek-how-to-host-your-own-website-on-windows-wamp/

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s