views:

45

answers:

1

Hello,

I would ask for any user who knows how to program in jquery and prototype of a help to me in the following code in this prototype.

function showPanelAds(){
    $('ads').style.visibility="visible"
}

and

function blog(id){
    var ActionAjax = new Ajax.Updater(
    {success:'blogphere'},
    '/inc/assistidos.asp',
    {
    method:'get',
    parameters:'queryname='+id,
    onFailure:function(){
    $('blogphere').innerHTML="error...<br/><a href=\"javascript:blog('"+id+"')\">Tente novamente</a>";
        }
    });
}

thank you from anyone who can help me.

thank you.

A: 

I don't know Prototype very well, but this should be the jQuery equivalent I believe.

function showPanelAds(){
    $('#ads').css('visibility','visible'); 
}

function blog(id){
    var ActionAjax = $.ajax({
        type:'GET',
        url:'/inc/assistidos.asp',
        data:'queryname='+id,
        success:function(data) {
            $('#blogphere').html(data); // Assumes you're returning some HTML
          //$('#blogphere').append(data); // Or use append to add to existing content
        },
        error:function(){
            $('#blogphere').html("error...<br/><a href=\"javascript:blog('"+id+"')\">Tente novamente</a>");
        }
    });
}

Docs

patrick dw