views:

20

answers:

1

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});
        DataAjax.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!

A: 

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);
    }
});
John Himmelman