Quantcast
Channel: Internet Explorer Web Development forum
Viewing all articles
Browse latest Browse all 3527

IE8.0.7601.17514 window.open opens window, returns null

$
0
0

Hi All,

We have windows 7  as 64bit OS installed recently and got IE 8.0.7601.17514 with 256 Cipher Strength.

We are facing problem while closing  pop up window using javascript, and this problem is affecting other team memebrs who are using simillar configuation as mentioned above.

Here are the code snippet

Approach 1:  See the below code is not working

var handle = window.open("http://www.example.com/details.jspuser=test&age=20", "windowname");

handle.close();   // Here handle is coming as null.

Approach 2: Following code also does not work

JavaScript:

  var target =  "windowname";

   var handle = window.open("about:blank",target);

   if(handle!= null) // here we are getting the handle object

    {

document.getElementById('form1').target =  target; // setting the target to Pop window

 document.getElementById('form1').submit();  // Now this will submit the form and send the GET request to pop up

alert(handle.closed);  // Also noticed that this line is giving "true", thiough we have not closed the pop up

 handle.close(); // does not close the pop up window

    }

HTML

<form id="form1" method="GET" action="http://www.example.com/details.jsp

<input type="hidden" name="user" value="test">

<input type="hidden" name="age" value="20">

</form>

Workaround :

if we open browser in protected mode: on this problem resolves. 

Is there any other way to solve this problem without changing the browser settings.

please help on this.

Regards

Atul


Viewing all articles
Browse latest Browse all 3527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>