views:

55

answers:

0

This is an Explorer only problem and the symptoms are:

I have links that when clicked will load in HTML chunks (none of which contain html header tags) using javascript. The html chunks are placed in various <div>s around the page, perhaps 3 different places with 3 different chunks brought in via javascript.

When these chunks load in the <title> tag of the page gets set to <title></title> for some unknown (to me) reason. I've used the IE developer toolbar to confirm this by inspecting the DOM tree.

I have other pages that do similar things but it does not seem to be a problem there.

Edit: Further inspection seems to reveal that swfObject is having something to do with it. One of the chunks I bring in has a SWF that is enabled by swfObject. If I disable the swfObject call the page no longer gets zapped.

Edit: code:

/**
* getContentItemById()
* @itemId = string
* @contentType = string
*/
function getContentItemById(itemId, contentType, subType) {
    $j.ajax({
        type: "GET",
        cache: false,
        url: "/gallery/",
        data: "contentType=" + contentType + "&itemId=" + itemId + "&slice=itemView" + "&subType=" + subType,
        dataType: "html",
        beforeSend: function (XMLHttpRequest) {
            $j("#viewer").fadeOut();
        },
        success: function(html){
            $j("#viewer").html(html).fadeIn();
            if (itemId && contentType) {
                var state = {};
                state["itemId"] = itemId;
                $j.bbq.pushState(state, 0);
            }
           },
        error:function (xhr, ajaxOptions, thrownError){
                //alert("Error code: " + xhr.statusText);
            }
    });