Set the value of 'link' parameter from a javascript function

Discussion in 'XML & RSS' started by stoicadl, Jul 21, 2010.

  1. #1
    It is possible, to set the value of 'link' parameter from a javascript function?
    Ex:
    <script>
    function fct(){
    window.location = "http:// ....."
    }
    </script>

    ......

    <title> Title </title>
    <description> Description </description>
    <link onclick='fct()'> &nbsp; </link>
     
    stoicadl, Jul 21, 2010 IP
  2. Deacalion

    Deacalion Peon

    Messages:
    438
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I'm guessing you mean a hyperlink (<a>) and not the link tag (<link>). As link tags should never even be visible, let alone clickable.
    You can change any attribute of a tag using setAttribute() - lookup unobtrusive javascript.
     
    Deacalion, Jul 22, 2010 IP