setAttribute("href) - linkObj.href= returning text node in IE

D

David

This is strange ...

I know about IE returning absolute URL's when using getAttribute but I don't
understand why it is appending the text inside of the <a> tag when using
setAttribute() or linkObj.href= ..as in this example...

http://mysite.verizon.net/microweb2/updateHref.htm

There are 2 functions in this page. The first one is where it displays this
anomoly. It appends the actual text onto the href "if" the text is written
out as an absolte URL. If the text is not written out as an absolute URL it
behaves correctly. Why would IE grab the text node and append it just
because the text is written as an absolute URL?


The 2nd function actually resets the text to overcome this anomoly but I
would like to know why IE is doing this.

David J.
 
D

David

There are 2 functions in this page. The first one is where it displays
this anomoly. It appends the actual text onto the href "if" the text is
written out as an absolte URL.

To be more clear, it is appending onto the actual text node the additional
snippet that also gets appended to the href. It should only append the href
and not the text node.

David J.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top