Reputation: 2227
Can someone explain why, in this example, the function is not firing? I've stripped it down to the simplest thing and I must have typo or wrong syntax for hyperlink.
JS
function takePic(type){
alert(type);
}
HTML
<a href="javascript:void(0)" onclick="takePic('1');">Track Progress</a>
Upvotes: 0
Views: 106
Reputation: 97717
Change onLoad
to no wrap (head)
in the "choose framework" dropdown. With onLoad, the function is wrapped in another function and does not have global scope.
Upvotes: 3