Hi,

I make Ajax ($.get) calls and in the calback part I call a function
defined elsewhere. In FireFox this is no problem. When I checked in IE
however I kept getting an error 'object expected'. It took a while to
figure out that if I remove the _call_ to the function with the actual
function body (the code defined in the function handler) the problem
disappeared and IE does not complain.. So instead of this:

$(document).ready(function(){
       $('#login').click(function(){
       $.get(
               "/?event=cms.showlogin",
               function(res){
                       removeLoginWindow();
                       addStyleSheet('/cms/css/cms.css')
                       $(document.body).append(res);
                       $('#closeButton').click(function()
{removeLoginWindow()})
                       $('#closeButton').css('cursor','pointer')
                       $('.loginWindow').draggable()
                       $("#loginWindow input:text[name='username']")
[0].focus()
               },
               "html"
       )
       showLoginWindow()
       });
})

I need top switch the calls to removeLoginWindow() and addStyleSheet
('/
cms/css/cms.css') with the actual code of these functions.

Is there no workaround for this or am I doing somehting wrong?

jquery-1.3.2.min.js
IE 7.0
FF 3.07
Win XP sp2

Thanks,

Marc

Reply via email to