I have the following jquery code working fine:
$('iframe#captcha')[0].contentDocument.location.reload(true);
$('input#captchainput').val('');
$('img#ajaxLoader').hide();
$('h3#loginFailed').show();
Is it possible to attached a callback to the .reload(true)?
I want to delay the 3 lines of code until after the reload has occurred.
No, you can’t. When the page has reloaded those three lines doesn’t exist any more. The entire page has been replaced by a brand new page that just happens to be identical.
If you want to do something after the reload, you have to save something somewhere that the code in the newly loaded page can check for.