I’m trying to load a page from my desktop, let’s name it as loadme.htm.
Now I have an index.htm file, which will load the loadme.htm.
Why is it that it cannot load when I open the index.htm from my desktop? Some jQuery functions work here like .trim(), .show(), etc.. But if I put it on WAMP, it will load successfully.
Edit:
this is how I load the “loadme.htm”
$.("#content").load("loadme.htm");
I assume you have used jquery ajax load function to load your file. It will not work unless you are using http call for this. When you are opening from desktop it is using file protocol and failing. Other jquery functions like trim(), show() works because it does not have any dependency on protocol type and browser itself can handle those calls.