tonyscarpelli Posted August 19, 2012 Share Posted August 19, 2012 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. Link to comment Share on other sites More sharing options...
HartleySan Posted August 19, 2012 Share Posted August 19, 2012 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. 1 Link to comment Share on other sites More sharing options...
tonyscarpelli Posted August 20, 2012 Author Share Posted August 20, 2012 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. Link to comment Share on other sites More sharing options...
Antonio Conte Posted August 20, 2012 Share Posted August 20, 2012 Inside XAMPP. I use it as a development server and upload to a normal server when I'm satisfied and sure the code is working as expeced. Link to comment Share on other sites More sharing options...
HartleySan Posted August 20, 2012 Share Posted August 20, 2012 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. Link to comment Share on other sites More sharing options...
Recommended Posts