determin color of a specific hyperlink

Ask a Question related to PHP Development, Design and Development.

  1. #1

    Default determin color of a specific hyperlink

    Is it possible to determin the color of the visible tekst of a specific
    hyperlink. I want one link to be another color then the other links after i
    have clickt it.


    thnaks

    roy
    The Netherlands


    Roy G. Vervoort Guest

  2. Similar Questions and Discussions

    1. Hyperlink color question
      Hello, I have a hyperink column in my datagrid <asp:datagrid ... > <ItemStyle ForeColor="black" Font-Names="Verdana, Arial, Helvetica"...
    2. Acrobat 6 - Hyperlink from a graphic hotspot to specific position in a PDF
      I am adding pages to a website. I am using Acrobat 6 Pro in some portions of the website. I would like to link a hotspot on a jpg graphic in one page...
    3. Text Link / Hyperlink - colour / color
      Hi, I have some basic textual hyperlinks in my movie. In MX how do I change the colour of links from the standard blue? Cheers, Chris
    4. Hyperlink to a specific point on another page - publisher 2003
      I am writing a page with a callendar on and want to link ( using a hotspot ) to an article on another one o my pages. There are several articles on...
    5. color of hyperlink column of datagrid
      Hi, I have a web page which written by ASP.net. The page contains a datagrid. Inside a datagrid, there is a hyperlink column. When user...
  3. #2

    Default Re: determin color of a specific hyperlink

    On 2004-02-02, "Michael Vilain <vilain@spamcop.net>" <> wrote:
    > Could a Javascript wander down the element hierarchy, and from the
    > properties of the link, determine the color. How would it communicate
    > that back to the server?
    It could set the value of an input-item and submit that form to the
    server.

    --
    [url]http://home.mysth.be/~timvw[/url]
    Tim Van Wassenhove Guest

  4. #3

    Default Re: determin color of a specific hyperlink


    "Roy G. Vervoort" <roy.vervoort@rojaal.nl> schreef in bericht
    news:401e36ec$0$328$e4fe514c@news.xs4all.nl...
    > Is it possible to determin the color of the visible tekst of a specific
    > hyperlink. I want one link to be another color then the other links after
    i
    > have clickt it.
    >
    >
    > thnaks
    >
    > roy
    > The Netherlands
    >
    >
    Roy,


    Assumed the anchor tag does not contain any nested HTML tags/ elements.

    Don't you know the color you gave the anchor tag through CSS style tag,
    attribute or stylesheet.?
    To change the color after a link is clicked or when the mouse hovers over
    the link you can specify the colors through the pseudo classes A: VISITED,
    A: ACTIVE or A: HOVER in a CSS style tag, attribute or stylesheet. And the
    browser will do the rest.

    Of course you can do this in a javascript function:

    <script type="text/javascript">

    function determine_color(obj_link){


    if (obj_link.currentStyle.color=='#ff0000'){
    alert('You already clicked me\nmy color = ' +
    obj_link.currentStyle.color);
    } else {
    alert('my color = ' + obj_link.currentStyle.color);
    }
    obj_link.style.color='#ff0000';
    obj_link.style.backgroundColor='#00ffff';
    }


    </script>

    where the link should be something like:

    <a href="#stay_put" onclick="determine_color(this);">Link 1</a>



    But having this said I failed to see what the PHP related problem is (hence
    the name of this news group) ;-)

    still HTH,

    Rob


    Rob Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139