...

View Full Version : onclick not working for link



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?

nmford
10-04-2011, 10:45 PM
I solved this please delete



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum