Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jQuery in action, problem with the examples

 
Karim Kiswarday
Ranch Hand
Posts: 50
Eclipse IDE Java PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
some time ago I learned jQuery by jQuery in action book, and I used a lot the examples included in the book using Firefox.

Now I have tried to run again that examples (principally lab.operation.html - chapter 2) but they don't work anymore and I have to access to them using a webserver.
In the example page, they don't show the "DOM Sample" and "DOM Sample Code", they are simply empty.
In the source code I see there is an ajax request but I 'm pretty sure that before I didn't use a webserver.

At the beginning I thought it was a problem about the browser (maybe some update changed something) but also with other browsers (Chrome, IE, Opera) I have the same issue.
I know you are not sorcerer, but do you have some kind of idea why now they don't call the ajax request?

Thanks,
KK
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65218
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Karim Kiswarday wrote: and I have to access to them using a webserver.

Do you mean as opposed to simply opening the files directly in the browser? Then yes. Ajax won't work correctly when using the file protocol, the files must be served by an HTTP server.

You can verify this by visiting the online version of the examples at http://www.bibeault.org/jqia2
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic