hi
is it possible for me to call a javascript function to change the background which i set in <body> in a cuteeditor....
this is my javascript function :
function fnChangeTemplate(TemplateID,Orientation,CategoryID,FileName,BackGround,Side)
{
if(Side=='front')
{
var editor1 = document.getElementById('<% = ceFrontDesign.ClientID %>');
var str=editor1.getHTML();
var sNewTemplate=BackGround.replace(/bbbbb/g,"/");
editor1.setHTML(str.replace(document.getElementById("txtTemplateFront_Background").value,sNewTemplate));
document.getElementById("txtTemplateID_Front").value=TemplateID;
document.getElementById("txtOrientation_Front").value=Orientation;
document.getElementById("txtCategoryID_Front").value=CategoryID;
document.getElementById("lblTemplateName_Front").innerHTML="Current Template : " + FileName;
document.getElementById("txtTemplateFront_Background").value=sNewTemplate;
}
else
{
var editor1 = document.getElementById('<% = ceBackDesign.ClientID %>');
var str=editor1.getHTML();
var sNewTemplate=BackGround.replace(/bbbbb/g,"/");
editor1.setHTML(str.replace(document.getElementById("txtTemplateBack_Background").value,sNewTemplate));
document.getElementById("txtTemplateID_Back").value=TemplateID;
document.getElementById("txtOrientation_Back").value=Orientation;
document.getElementById("txtCategoryID_Back").value=CategoryID;
document.getElementById("lblTemplateName_Back").innerHTML="Current Template : " + FileName;
document.getElementById("txtTemplateBack_Background").value=sNewTemplate;
}
}
but it cannot work !!!
any idea to solve this problem ?
thanks