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

Discussion in 'Javascript' started by David, Dec 6, 2006.

  1. David

    David Guest

    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.
     
    David, Dec 6, 2006
    #1
    1. Advertising

  2. David

    David Guest

    > 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.
     
    David, Dec 6, 2006
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    1,466
  2. Matt
    Replies:
    7
    Views:
    14,755
    John C. Bollinger
    Nov 8, 2004
  3. Tjerk Wolterink
    Replies:
    2
    Views:
    1,437
    Dimitre Novatchev
    Aug 24, 2006
  4. RC
    Replies:
    0
    Views:
    465
  5. Jeremy J Starcher
    Replies:
    8
    Views:
    227
    Jorge
    Apr 8, 2010
Loading...

Share This Page