javascript open a function which is a value of a funtion

Discussion in 'JavaScript' started by narfy892, Aug 27, 2008.

  1. #1
    I want the value of this :
    document.getElementById('clearthisok').value;
    to be referred to a function knowing that I don’t know its value.

    Ex:

    <script>
    document.getElementById('clearthisok').value="xxx01();";

    //syntax that open the function xxx01()//

    function xxx01()
    {
    Alert("it’s working")
    }
    </script>
     
    narfy892, Aug 27, 2008 IP
  2. xlcho

    xlcho Guest

    Messages:
    532
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #2
    xlcho, Aug 27, 2008 IP
  3. narfy892

    narfy892 Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    eval(document.getElementById('clearthisok').value)
     
    narfy892, Aug 27, 2008 IP