I'm using Prototype as the framework and my Ajax function call is as follows...
Code: Select all
function call_ajax_agree( id )
{
new Ajax.Request(
"/ajax.php?type=comment-agree&id=" + id,
{
method: 'get',
onSuccess: function( transport )
{
var response = transport.responseText || "<font style='color:red;'>error</font>";
$('comment_vote_' + id).replace(response);
},
onFailure: function(){ alert('Something went wrong...') }
}
);
}Code: Select all
<span class="comment_rating"><span class="green">+4</span>/<span class="red">-3</span></span> | agreedI'm thinking that it might be Prototype protecting itself from some sort of attack and just parsing out the HTML returned before spitting it out.
Anything look wrong here guys?