if link visited change font-size dynamically

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • reyo
    New Member
    • Dec 2008
    • 2

    if link visited change font-size dynamically

    Hi,
    i design a dynamic web page.infact it will be a css generator.
    i have a question about visited link.
    i want to change color,font-size,font-weight etc. of a link when it is visited.
    when a user change font-size dynamically visited link's font-size will be change.
    i use dropdown list for font-size values .
    there are 24 links on the page.links id="a1" a2,a3, so on..
    Code:
    function denemelink(){
    var ahtip=document.getElementById('ahfsize').options[document.getElementById('ahfsize').selectedIndex].value;
    for(var i=1;i<25;i++) 
    {var nesne="a"+i;
    var link=document.getElementById(nesne);
     if(link.onmouseover==true){
     document.getElementById(nesne).style.fontSize=ahtip;
     break;
    }
    }
    Code:
      <select id="ahfsize" style="width: 82px" onchange="denemelink();">
                                    <option selected="selected"></option>
                                        <option value="XX-Small">XX-Small</option>
                                     <option value="X-Small">X-Small</option>
                                     <option value="Small">Small</option>
                                     <option value="Medium">Medium</option>
                                     <option value="Large">Large</option>
                                     <option value="X-Large">X-Large</option>
                                     <option value="XX-Large">XX-Large</option>
                               
                                </select>

    i coded so.but it doesn't work. how can i do it ??
  • reyo
    New Member
    • Dec 2008
    • 2

    #2
    why nobody answer me :(((

    Comment

    • gits
      Recognized Expert Moderator Expert
      • May 2007
      • 5390

      #3
      so you just want to set the font-size for 'visited' links? so the ones that a user already clicked on?

      Comment

      • Dormilich
        Recognized Expert Expert
        • Aug 2008
        • 8694

        #4
        maybe the problem wasn't clear...

        we can answer much better if you describe
        1. Any error messages you are getting including the code that the message references
        2. What the code should do
        3. What the code does not do that it should do
        4. What the code does do that is should not do

        one obstacle I see is line 6: element.onmouse over is usually not a boolean, see MDC – onmouseover

        regards

        Comment

        Working...