Forum Moderators: open
<script language="javascript" type="application/javascript">
window.opener.location.reload(true);
window.close();
</script>
this is working fine on fire fox but not on IE! any ideas?
If I was to venture a guess, I would guess that IE doesn't like the "application/javascript" type. But I haven't been able to test this theory.
<script type="text/javascript">
not
<script language="javascript" type="application/javascript">
Language attribute is deprecated and not needed.
Second, try
window.opener.document.location.reload()
However, if the page loaded in window.opener is a result from a submitted form it will give you "data needs to be resubmitted" warning. It may be better to pass variables to your function and build a query string, like
// Be sure to use the logical "or" pipe character, not ¦¦
function reloadParent(pid,state,func) {
if ((! pid) ¦¦ (! state)) {
alert('Record ID and display required to close and refresh.');
return;
}
if (window.opener && !window.opener.closed) {
//window.opener.document.location.reload()
window.opener.document.location='yourscript?'+func+'='+state+'&id='+pid;
window.close();
}
}