homerUK
11-28-2002, 10:04 AM
Hi,
Here is the scenario.. I have a iFrame which people can enter hyperlinks in.... they highlight the text, and press the link button. I can add the link and everything but I want to be able to add style info.
To do this, I need to check if the hyperlink already has a style tag attached to it.
so it would look something like:
<a href="aaa.htm" target="_blank" style="text-decoration:none">hello</a>
I am using the following code:
link = window.opener.iView.document.selection.createRange().parentElement();
which can then be used like:
link.href would return "aaa.htm"
link.target would return "_blank"
but I would have thought that
link.style would return "text-decoration:none" but it only seems to return "[object]"
Any ideas on how I get the value of "style"??
Many Thanks.....
Here is the scenario.. I have a iFrame which people can enter hyperlinks in.... they highlight the text, and press the link button. I can add the link and everything but I want to be able to add style info.
To do this, I need to check if the hyperlink already has a style tag attached to it.
so it would look something like:
<a href="aaa.htm" target="_blank" style="text-decoration:none">hello</a>
I am using the following code:
link = window.opener.iView.document.selection.createRange().parentElement();
which can then be used like:
link.href would return "aaa.htm"
link.target would return "_blank"
but I would have thought that
link.style would return "text-decoration:none" but it only seems to return "[object]"
Any ideas on how I get the value of "style"??
Many Thanks.....