I just tried your example @sama55 and it somehow works. But as i m very new on the Q2A framework i really cant understand how to make it works. Right now it displays the favorite "star icon" next to each tag and it generates a unique name eg (favorite_T_604_1) on each tag as it should be, but when i click on each "star icon" it saves the tag to my favorites but it doesn't show the "star icon" as activated/favorited. On error console i am getting this error :
"TypeError: elem.form is null"
from file qa-page.js when i try to unfavorite a tag.
in the file qa-page.js there is this function:
function qa_favorite_click(elem) {
var ens=elem.name.split('_');
var code=elem.form.elements.code.value;
qa_ajax_post('favorite', {entitytype:ens[1], entityid:ens[2], favorite:parseInt(ens[3]), code:code}, function (lines) {
if (lines[0]=='1')
qa_set_inner_html(document.getElementById('favoriting'), 'favoriting', lines.slice(1).join("\n")); else if (lines[0]=='0') {
alert(lines[1]);
qa_hide_waiting(elem); }
else
qa_ajax_error(); } );
qa_show_waiting_after(elem, false);
return false; }
Could you please guide me little bit more @sama55 cause this function is very important to me and i guess for other users too from what i already did read in the forum.
Many Thanks