开发者

help conversion code in prototype to jquery

Good day, I'm done with the following code into prototype

var DataAjax = new Ajax.Updater('Data','/inc/infoPanel.asp', {method:'get', parameters:'Name='+appIdOrName});
        Dat开发者_如何学CaAjax.onComplete = function(){
        if ($('Data').innerHTML.indexOf('status=ok')>-1){
            loadBlogsphere(IdOrName);
        }

I wonder how would this code in jquery, I'm trying here but I can not.

I thank anyone who can help.

thanks!


You're looking for the jQuery's load() method...

.load() - Description: Load data from the server and place the returned HTML into the matched element. (from jQuery Docs)

$('#Data').load('/inc/infoPanel.asp', { Name : appIdOrName }, function(responseData)
{
    // Not sure about this part...
    if (responseData.indexOf('status=ok') > -1)
    {
        loadBlogsphere(IdOrName);
    }
});
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜