If you could show the actual page, we, possibly, could help you better.
If you want to trigger the button only after the iframe is loaded, you might want to check if it has been loaded or use the iframe.onload:
<iframe .... onload='buttonWhatever(); '></iframe>
<script type="text/javascript">
function buttonWhatever() {
$("#<%=Button1.ClientID%>").click(function (event) {
$('#<%=TextBox1.ClientID%>').change(function () {
$('#various3').attr('href', $(this).val());
});
$("#<%=Button2.ClientID%>").click();
});
function showStickySuccessToast() {
$().toastmessage('showToast', {
text: 'Finished Processing!',
sticky: false,
position: 'middle-center',
type: 'success',
closeText: '',
close: function () { }
});
}
}
</script>