Bummer! You have been redirected as the page you requested could not be found.

Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript AJAX Basics (retiring) jQuery and AJAX Introducing jQuery

Vittorio Somaschini
Vittorio Somaschini
33,371 Points

Introducing jQuery (with Ajax) - problems with workspaces?

Hello Guys.

I am doing the ajax course and it looks really nice I have to say, but..

I managed to arrive at this point, when we combine ajax and jQuery in order to do powerful stuff in an easy way, but..

I can't get files working properly through workspaces (while I used it with no problems so far during the course): after simply launching the workspace relative to this lesson, I get both files (jQuery and Javascript in the example.html) and they code seems good. It looks good probably because I did not touch it at all yet :)

But When I launch the preview the ajax code does not work.

So, I have check the code and it looks alright. Last test I did was copying and pasting the code in a Sublime Text 2 file (html) and launching via browser (with mamp) without touching the code and it works fine (have also copied the sidebar.html file)

So, I am now wondering: can this be a problems with workspace?

Thanks

Vittorio

1 Answer

Note that if you're trying to run a file besides the index.html file, you'll need to add the filename to the URL after you open it to preview.

e.g. if you preview and the URL is something like this: http://port-80-asdfasdf.treehouse-app.com/

Then for the jquery-example.html file, change it to: http://port-80-asdfasdf.treehouse-app.com/jquery-example.html

Or, just rename the file you actually want to preview to index.html, after renaming any other file with that filename.

Hope that helps!