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);
}
});
精彩评论