Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Oct 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    onclick not working for link

    Hey guys, I have this JS.

    Code:
    function funcBut(){
    	document.getElementById('ref_button').innerHTML = 'pressed';
    }
    Now, this button activates the function with no problem:
    Code:
    <input type='button' onclick='funcBut();' value='Change Text'/><br />
    But this link won't work and I don't understand why
    Code:
    <a href="#" onclick="funcBut(); return false;">test</a><br />
    Can anyone help?

  • #2
    New to the CF scene
    Join Date
    Oct 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I solved this please delete


  •  

    Posting Permissions

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