I have a portal with an approval button. When clicked, it opens a pop-up with a different page where the user can approve a request. After approval, the pop-up closes and the source page is redirected using the URL passed from the pop-up.
The approval process is handled in the code-behind, and a JavaScript function is called after approval to close the pop-up and navigate the source page.
C# Code to call the javascript
ClientScript.RegisterStartupScript(this.GetType(), "closewindow", "RedirectToCognos('" + redirectUrl + "');", true);
However, on the line of code in the code-behind where the JavaScript function is called, I encounter the error “: ERR_TOO_MANY_REDIRECTS.”
Javascript function to refresh source
function RedirectToCognos(url) {
window.opener.location.href = url;
window.close();
}
This was working well for years and stopped after recent browser update.
I tried to just close the pop up stillll the error comes at ClientScript.RegisterStartupScript