how to change link.text color dynamically ?

Discussion in 'Javascript' started by irma, Sep 30, 2003.

  1. irma

    irma Guest

    I have 2 frames, one frame is a table of content with a bunch of
    links, and the other frame houses the contents. I want to be able to
    change the
    color of the link text when the user clicks on it.

    I tried this:
    var name = document.links[0].text;
    name.fontcolor("yellow");

    but didn't work, probably because "name" is a copy, not a reference to
    the link object property right ? Can anyone help ? Thanks a bunch in
    advance!!

    Regards,
    Margaret
     
    irma, Sep 30, 2003
    #1
    1. Advertisements

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. Matt Adams
    Replies:
    0
    Views:
    1,115
    Matt Adams
    Aug 26, 2003
  2. Hilde Vons

    change (fore)color of link doesn't work

    Hilde Vons, Feb 15, 2006, in forum: ASP .Net Mobile
    Replies:
    0
    Views:
    241
    Hilde Vons
    Feb 15, 2006
  3. Kamaljeet Saini
    Replies:
    0
    Views:
    897
    Kamaljeet Saini
    Feb 13, 2009
  4. Margaret Asami

    how to change link.text color dynamically ?

    Margaret Asami, Sep 30, 2003, in forum: Javascript
    Replies:
    1
    Views:
    191
  5. Matt
    Replies:
    5
    Views:
    418
    Michael Winter
    Feb 12, 2004
  6. Replies:
    7
    Views:
    693
    Mick White
    Feb 2, 2005
  7. Replies:
    0
    Views:
    364
  8. apparker
    Replies:
    10
    Views:
    602
    apparker
    Apr 3, 2007
Loading...