Click to See Complete Forum and Search --> : createControlRange


andrewp
12-03-2002, 06:35 PM
I am building a online HTML editor / content management tool and I need to be able to get and set attributes of different tag elements based on the cursor location in a editabled iFrame. So far I have tired the following peices of code with no success.

URLstr = idContent.document.selection.createRange().parentElement().href;
// URLstr = idContent.document.selection.createRange().item(idContent.document.selection).getAttribute("href");
// URLstr = idContent.document.selection.createControlRange().href
// URLstr = idContent.document.selection.createRange().href

if anyone knows what im doing wrong or a good place to get information on what im try to do any help would be greatly appreciated.

Zach Elfers
12-03-2002, 06:40 PM
If those two // are in your real code, that would cause the problems.

andrewp
12-03-2002, 07:02 PM
the comment // are not on the first line and lines with // are things i tired and commented out because they did not work