views:

42

answers:

1

I am trying to use jQuery load() function to get content from another page via AJAX. It works on Firefox, Google Chrome, but not in Internet Explorer 7 & 8.

Here is the page I am developing: http://139.82.74.22/70anos/no-tempo

All the jQuery code is working normally in Internet Explorer, but the specific part that should bring the destination page isn't. To understand the problem, one must click the "Há 80 anos" or "Há 70 anos" block and click any of the links inside it. It should open a panel underneath the timeline with the content of the block.

Here is the code that pulls the external content:

        jQuery('a.link-evento').click(function() {
            var strUrl = jQuery(this).attr('href');
            var objBlocoConteudo = jQuery(this).parents('div.view-content').next().find('div.conteudo-evento')
            objBlocoConteudo.css('display','block').animate({ opacity: 1}, {duration: 350}).load(strUrl + ' #area-conteudo-evento');
            return false;
        });

With this code I am grabbing the URL of the destination page and telling the browser not to do a normal request, but to open it using jQuery load() function.

Any help appreciated fixing this IE... Thank you.

+2  A: 

I'm pretty sure AJAX requests have to be made to a domain name in IE as a security precaution. If you map a domain to your 139.82.74.22 address your problem should go away.

You cant make an .Load(http://139.82.74.22/..), it would have to be .Load("http://mysite.com/mypage")

Climber104
Hummm, thanks for the hint. I currently don't have a domain name for this development server, but I will get one ASAP with the server admin to check if this works. Thank you so much. I will get back and assign your answer as correct as soon as I have cleared this. Any cahnces I can turn out this security configuration in IE advanced settings? I will set low security and give it a try just to confirm this is the issue... Thanks again...
Marcos Buarque