Hello

i am trying to have text-decoration applied on some text depending on the value of certain variable. If the value of myvar=0 text-deco =none and if it's 1 then text deco= line-trough...

Kind of the same thing that emails web apps like yahoo or gmail do with mails read or unread if it's unread then email title/subject is bold/strong but if it's read then email title is in normal font-weight...

here is some piece of code i have written to do that


the text on which i want to apply the conditionnal decoration is a table cell (cell2DisplayCell1), the text itself is inserted by the innerHTML instruction!

I tried to introduce the conditional statement with a function displaylinksLineThrough() which is defined in the second block code...
Code:
	

cell2DisplayCell1.style.textDecoration = "displaylinksLineThrough(displayTitleDestbtn"+SmartLink.smartlinks_infos[sli].id_dest+", "+SmartLink.smartlinks_infos[sli].deleted+")"
cell2DisplayCell1.innerHTML = (SmartLink.smartlinks_infos[sli].title_dest);

Function def:


Code:
function displaylinksLineThrough(links_status_check, flag_deleted)
{

	if (flag_deleted == 1)
	{
	document.getElementById(links_status_check).style.textDecoration = 'line-through';
	}

	else
	{
	document.getElementById(links_status_check).style.textDecoration = 'none';
	}
}