Hi,
I used YUI3 and I don´t know why the page reload(refresh). I put the code below, thanks!!!
Cheers,
Tony
NS.useful = function(id,table,useful,id_objeto)
{
//Valores
var nom_table = Nom_Table(table);
var temparray = '';
var courseid = QueryString.id;
temparray = 'tablename' + '=' + nom_table + '&' + 'id_tablename' + '=' + id + '&';
temparray += 'courseid' + '=' + courseid + '&' + 'useful' + '=' + useful + '&' ;
Y.io(M.cfg.wwwroot + '/course/format/socialmedia/actions/save_useful.php', {
on: {
success:M.format_socialmedia.success_useful(id,table,useful,id_objeto),
failure:M.format_socialmedia.failure_useful
}, context: M.format_socialmedia, method: 'post', data: temparray});
}
HTML
<span>