1

For some reason the following code (which triggers parent-page functions) will not work in IE11. Its been working fine uptil now but no longer. To note: I have tried to turn off Protected mode (which is not a solution for customers) but this didn't work either!

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="X-UA-Compatible" content="IE=8" />
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>Register</title>
  <script type="text/javascript" src="https://code.jquery.com/jquery-latest.min.js"></script>  
</head>
<body>      
<script type="text/javascript">        
  var accounts = window.opener.$('input[name="accounts_added"]');
  var text = window.opener.$('#counter_$id');

  $(accounts).val(parseInt($(accounts).val()) + 1);

  //window.opener.$('input[name="subBtn"]').show();
  window.opener.updateAjaxbox();

  window.close();      
</script>
</body>

Ukuser32
  • 2,147
  • 2
  • 22
  • 32
  • From your code, it does look like its related to protected mode and there doesnt seem to be a solution other than turning protected mode off: https://social.msdn.microsoft.com/Forums/ie/en-US/5d9efaa1-78d5-45dc-a04d-d9fde768379f/ie-11-windowopener-in-popup-dialog – 6ton Nov 14 '14 at 15:20
  • I've found http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_win_opener which also fails in IE11 so it must be the opener. Is there any alternative to using that? – Ukuser32 Nov 14 '14 at 15:49
  • Have you tried forcing "edge" instead of ie8 mode? – BReal14 Nov 14 '14 at 15:49
  • Thanks brian - I think we were both typing at the same time! The problem with modal is I need it to go off to another page and come back to it. It has to operate a whole authentication process. Could do it in an iframe I suppose? – Ukuser32 Nov 14 '14 at 15:50
  • I tried to w3 schools site in ie11 and it works fine for me. It might be your browser? – BReal14 Nov 14 '14 at 15:50
  • You can always send your auth off via Ajax... – BReal14 Nov 14 '14 at 15:50
  • Its the socialmedia accounts - so you have to transfer the user to say facebook and receive a request back to that page. I'm also not sure if they would allow their pages to be loaded in a iframe. I also then need to trigger an update on the parent page which again I think an iframe/modal might struggle? – Ukuser32 Nov 14 '14 at 15:53
  • First, [never use jquery-latest in production](http://blog.jquery.com/2014/07/03/dont-use-jquery-latest-js/). Next, why load jQuery at all in this window if you are using the opener's jQuery? Are these windows in the same domain? – Dave Methvin Nov 15 '14 at 20:46
  • Yes they are in the same domain. And yes I have seen that you shouldn't use jquery latest in production which we will stop in due course. Question remains is there a decent alternative? – Ukuser32 Nov 17 '14 at 09:05
  • 1
    Well my solution - which I don't feel is quite an "answer" was to run a setInterval and keep checking the SESSION which was being added to every second. The session check code had no DB calls so wasn't expensive and checks in parallel with the window being open. Alternatively a good answer was on http://stackoverflow.com/questions/18625733/how-do-i-get-around-window-opener-cross-domain-security. – Ukuser32 Nov 17 '14 at 15:16

0 Answers0