Load reports success but does not work..

Load reports success but does not work..

Hello!

I have a problem that is driving me insane. Currently I am working in VS2008 with an MVC2 project and I am using jQuery 1.4.1. A very easy task has somehow become utterly complex and I don´t know what I might be missing.

I am trying to use the load() function (  http://api.jquery.com/load/ ) to load remote content into a div but I cannot get it to work. With a callback function I have determined that load does not return an error, but a success. Still, noting is displayed in the div. I´ve gone so far that I´ve downloaded demo examples and mysteriously I could then load only the same file I was in; index.html could load('index.html') where as no other urls could be loaded. I´m starting to think that this might be computer/system-specific. Tried several browsers as well (including IE, FF, Opera, Iron).

Markup link to function:
  1. <span onclick="loadContent();">n</span>
Code:

  1.    function loadContent() {
  2.         var url = 'http://www.myserver.org/index.php';

  3.         $("#content").fadeIn().load(url, function(response, status, xhr) {
  4.             if (status == "error") {
  5.                 var msg = "Sorry but there was an error: ";
  6.                 $("#content").html(msg + xhr.status + " " + xhr.statusText);
  7.             }
  8.             else {
  9.                 $("#content").append(status);
  10.             }
  11.         });

  12.         $("#content").css('z-index', '1000');
  13.     }
Please observe that I have already tried without the ELSE-clause. I simply added it to see what the status message would be, and the status message displayed is 'success', nothing else is displayed.

Previously I had a simplified version of this code:
  1.    function loadContent() {
  2.         var url = 'http://www.myserver.org/index.php';

  3.         $("#content").load(url);
  4.         $("#content").css('z-index', '1000');
  5. $("#content").show();
  6.     }
The result was the same with this code, nothing displayed.

Anybody?