How to make a jquery function call after "X" seconds
You can just use the normal setTimeout method in JavaScript.
ie...
setTimeout( function(){
// Do something after 1 second
} , 1000 );
In your example, you might want to use showStickySuccessToast
directly.
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>