Jump to content
Larry Ullman's Book Forums
tonyscarpelli

Ajax Chap 11 Code Not Working

Recommended Posts

I jumped to the Ajax chapter since I needed to understand it in some other projects.

 

I entered in the code from the book and I can't get it to work.

 

I tried the downloaded code from the book site, and that didn't work either.

 

Do I have to put this code in my web site or can I run it from my loacal PC?

 

Thanks.

Share this post


Link to post
Share on other sites

Ajax is a combination of Javascript with a server-side language, and you need to be running a server to run the server-side scripts called from JS via Ajax.

If you have a Web server, you can use that, or a better option for testing purposes would be to install a virtual Web server software package like XAMPP (which most people here use) and run the scripts from there.

  • Upvote 1

Share this post


Link to post
Share on other sites

Thanks HartleySan, I installed Xampp and worked my way through some install errors, but got it to work.

 

I put the Ajax Test book code into the server and got it to work.

 

I have a question about this, however.

 

Do you guys edit your code outside Xampp and copy the code into it?

 

Or do you edit the code inside the Xampp server?

 

Thanks.

Share this post


Link to post
Share on other sites

XAMPP is nice in that it's local to your machine and no one else can access the code, so it's very secure for testing purposes.

Like Antonio said, I generally develop in XAMPP until I'm satisfied, and then transfer it over to a real Web server.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...