Forum Moderators: open
Your post is a bit unclear. But if I think I understand what you are asking, you want to also run the somefunction() when explicitClick() is called on from a different onclick event in another element?
Then simply do this:
function somefunction(){
alert("This is somefunction()");
}
function explicitClick(){
somefunction();
alert("This is explicitClick()");
}
<input type="button" id="btnLoad" onclick="somefunction()">
<input type="button" id="OtherbtnLoad" onclick="explicitClick()">
Alternatively, and perhaps less cleanly in the html code, you could just call two functions in the onclick:
<input type="button" id="OtherbtnLoad" onclick="somefunction(); explicitClick();">