.ajax not being invoked

Posted by coffeeaddict on Stack Overflow See other posts from Stack Overflow or by coffeeaddict
Published on 2010-04-14T13:10:25Z Indexed on 2010/04/14 13:13 UTC
Read the original article Hit count: 104

Filed under:

I've got a javascript function I created. Somewhere in that function, this line is called:

var divContent = getDataAsyncHtml(dialogDiv.attr("winHref"));

I'm not sure why the .ajax is not being invoked once it hits my getDataAsyncHtml function. Do I need a function() ?

function getDataAsynHtml(urlWithContent)
{
    alert("urlWithContent: " + urlWithContent);

    // jQuery async request
    $.ajax(
    {
        url: urlWithContent,
        success: function(data) {
            return $('.result').html(data);
            alert('Load was performed.');

        }
    });
}

© Stack Overflow or respective owner

Related posts about jQuery