Update ajax-wishlist.js
innerHtml can not execute javascript from "data". If someone modify php files returned from jquery function and includes a script, it's not executed.
This commit is contained in:
@@ -58,7 +58,7 @@ function WishlistCart(id, action, id_product, id_product_attribute, quantity)
|
|||||||
if($('#' + id).length != 0)
|
if($('#' + id).length != 0)
|
||||||
{
|
{
|
||||||
$('#' + id).slideUp('normal');
|
$('#' + id).slideUp('normal');
|
||||||
document.getElementById(id).innerHTML = data;
|
$('#' + id).html(data);
|
||||||
$('#' + id).slideDown('normal');
|
$('#' + id).slideDown('normal');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -81,7 +81,7 @@ function WishlistChangeDefault(id, id_wishlist)
|
|||||||
success: function(data)
|
success: function(data)
|
||||||
{
|
{
|
||||||
$('#' + id).slideUp('normal');
|
$('#' + id).slideUp('normal');
|
||||||
document.getElementById(id).innerHTML = data;
|
$('#' + id).html(data);
|
||||||
$('#' + id).slideDown('normal');
|
$('#' + id).slideDown('normal');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -147,7 +147,7 @@ function WishlistManage(id, id_wishlist)
|
|||||||
success: function(data)
|
success: function(data)
|
||||||
{
|
{
|
||||||
$('#' + id).hide();
|
$('#' + id).hide();
|
||||||
document.getElementById(id).innerHTML = data;
|
$('#' + id).html(data);
|
||||||
$('#' + id).fadeIn('slow');
|
$('#' + id).fadeIn('slow');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user