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. 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. Matt Adams
    Replies:
    0
    Views:
    872
    Matt Adams
    Aug 26, 2003
  2. Kamaljeet Saini
    Replies:
    0
    Views:
    377
    Kamaljeet Saini
    Feb 13, 2009
  3. Margaret Asami

    how to change link.text color dynamically ?

    Margaret Asami, Sep 30, 2003, in forum: Javascript
    Replies:
    1
    Views:
    106
  4. Matt
    Replies:
    5
    Views:
    178
    Michael Winter
    Feb 12, 2004
  5. Replies:
    7
    Views:
    362
    Mick White
    Feb 2, 2005
Loading...

Share This Page