function myFunction() { alert("yes") } <INPUT TYPE="button" onClick="javascript:myFunction()" name="joe" value="Place Order"> When I click the form button nothing happens, no error messages either in the browser. I've placed the function in both the head and body, but still not working.
Take out the javascript:, it's not necessary in onX attributes. <INPUT TYPE="button" onClick="myFunction();" name="joe" value="Place Order"> HTML:
Just wondering, how come it worked without the javascript: but didn't when you had it? I have used javascript: on all my onX attributes and never ran into this issue.
Might depend on the browser you're using. I've never seen trouble with it either, but still, the javascript: doesn't belong there cause the browser expects a javascript in these attributes. No other code can be executed there.
I used caps here JavaScript: and not, javascript: and it worked this time, so not having capital letters could have been the culprit.