
October 24th, 2002, 04:16 AM
|
|
Contributing User
|
|
Join Date: Jun 2002
Posts: 62
Time spent in forums: 12 m 9 sec
Reputation Power: 7
|
|
|
execCommand Help!!
I have the following piece of code. I created a TextRange object called myRange and i wanted to make this selection a link, linking to a destination defined by linkpath (assumed it is already defined).
Then I use the execCommand method to do the rest. However, I am getting an error that says something about, 'object doesnt support property or method..' I have seen some code which manage to do this (causing a range object to use the execCommand method)but mine is not working.
After much research, i found out that a range object can actually use either one of three methods, namely, clear, createRange and empty......is this true. If yes, how should the below, structured?
myRange = window.opener.foo.document.selection.createRange()
myRange.execCommand("createlink", false, linkpath);
__________________
Beginner
|