471,120 Members | 1,497 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,120 software developers and data experts.

ascx control file which calls an aspx page, Tried all combinations of window.opener to reload the ascx page.

ascx control file which calls an aspx page, Tried all combinations of window.opener to reload the ascx page. It has no form on it so I even tried using form1 in the name to see if I could get it to reload. I even put a button on the page and that does an onClientClick that works on the button in the page. However when I try to invoke it with see the code below it will not reload from the aspx page(the child page).

function refreshAndClose1() {
opener.location.reload();
window.close();
}
async function refreshAndClose() {
function doit() {
if (window.opener && !window.opener.closed) {
window.opener.location.reload();
}
}
window.close();
setTimeout(doit, 100);
}
function surrogateUpDateFunc() {
alert('We are inside the aspx function');
window.opener.document.Form1.getElementById('btnRe fresh').click();
//function reloadwin() {
// window.open('', '_self', '');
// self.close();
// }
//setTimeout(reloadwin, 1000);
self.close();
//alert('We are about to attempt unload of opener!');
//window.opener.reload();
//window.opener.document.location.reload();
}

One thing which might be at issue here is the progarmmer who wrote this was using a lot of what he called modal stuff with async to get things to work in Chrome which were working ifine in the old IE11.
Jun 27 '22 #1
0 6768

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Randy Developer | last post: by
2 posts views Thread by InHyuk, Song | last post: by
1 post views Thread by Vikas Kumar | last post: by
3 posts views Thread by Greg Collins [Microsoft MVP] | last post: by
5 posts views Thread by Simon Rigby | last post: by
3 posts views Thread by Ollie Riches | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.