<input type="button" value="Click" id="C" onclick="Go();"> <input type="button" value="Wait" id="W" onclick="javascript:alert('Amazing!');"> <script> var C=document.getElementById("C"); var W=document.getElementById("W"); function Go(){ W.onclick(); } </script>