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