Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I have a problem with document.createRange().htmlText

Status
Not open for further replies.

FadeOut

Programmer
Mar 27, 2004
14
0
0
CA
I got this code in my document but the last line seems to give me some problem (methods is not supported or does not exists???)

txt = document.selection.createRange().htmlText;
document.selection.createRange().htmlText = "<B>" + txt + "</B>";

Anyone got an idea on how to resolve this problem?

Thanx
FadeOut
 
document.selection.createRange().htmlText is a read only command, u cannot set a value to it.
try this:
document.selection.createRange().pasteHTML("<B>" + txt + "</B>");




Known is handfull, Unknown is worldfull
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top