I need to click on the button on the previous screen by clicking on the button at the current screen Writing method for clicking on the current button screen is easy (see below) but I have troubles finding the button on the previous screen.
$('body.printing').prepend('<input type="button" value="Retry" id="RetryLetter"/>');
$("#RetryLetter").click(function()
{
// parent.history.back().$("#printLetter").click();
var prButton = document.referrer.getElementById("printLetter");
prButton.click();
// window.opener.$("#printLetter").click();
});
I tried several variants – so far nothing worked