PDA

View Full Version : Difficult DHTML: how to add css class to the table cells' text


csliu
10-08-2003, 10:05 AM
Hi,

We use a HTML Editor, when highligt certain text, we can change its CSS format by DHTML, but when we select text in more than 1 table cells, it doesn't work and got "upspecified error", here is the code:

var whichPara = ctrlHTML.DOM.selection.createRange();
var selType=ctrlHTML.DOM.selection.type;

if(selType!="Control"){
if(whichPara!=null){
outString = addFontStyle(whichPara.htmlText,thisStyle);
whichPara.pasteHTML(outString);
}

I think that is because the table cells are read only for the pasteHTML, does any one knows how to solve this problem?

Thanks,

JVRudnick
10-13-2003, 09:31 AM
try a DHTML forum....


Jim