Javascript popup does not work on IE11

Asked

Viewed 84 times

1

After migrating to windows 10 and IE11 my popup stopped working. I can not say what it is, I searched and found nothing. On machines with windows 7 and IE7,8 still working normally. Important input data need to be posted to the popup.

Follows code;

JAVASCRIPT

function target_popup(form) {   
    window.open("", "formpopup", "width=600, height=260, top=300, left=130"); //me parece que o problema está aqui.
    form.target = "formpopup";
}

HTML

<form id="form" action="local.php" method="POST" onsubmit="target_popup(this)">
   <input type="text" name="date" id="date" />
   <input type="text" name="nome" id="nome" />
   <input type="submit" value="SUBMETER" />
</form>

SOME TESTS

After entering the urls manually the popup opens;

//abre o site do google
window.open("http://www.google.com", "formpopup", "width=600, height=260, top=300, left=130");
//abre "http://local.php" inexistente
window.open("http://local.php", "formpopup", "width=600, height=260, top=300, left=130");
//abre "http://local.php" inexistente
window.open("//local.php", "formpopup", "width=600, height=260, top=300, left=130");

Already the urls below do not work;

window.open("http://server:porta/local/arquivo.php", "formpopup", "width=600, height=260, top=300, left=130");
window.open("local/arquivo.php", "formpopup", "width=600, height=260, top=300, left=130");
window.open("arquivo.php", "formpopup", "width=600, height=260, top=300, left=130");
window.open("\\arquivo.php", "formpopup", "width=600, height=260, top=300, left=130");

As a conclusion it seems that IE11 only accepts the address with http:// or // but does not accept subdirectories and the address must have one . someone, tests outside of that did not work

  • What is this variable w?

  • Strange. If you’re opening on IE7 and 8 and not on IE11, these variables w and h are coming from some code incompatible with IE11. I would have to post in the question the code that deals with these variables so we can analyze a change compatible with these 3 browsers in common.

  • I did some tests and it doesn’t seem to be the variable w, it really is coming from elsewhere but she gets only a whole number, I removed it not to confuse, I did some interesting tests I will post on the question.

  • Well eh... apart from these variables, the popup normally opens here on my IE11.

  • My own taking will not. I inserted the tests in the question.

  • Just as a guarantee, press F12 on IE, go to the Emulation tab and check which document mode is.

  • In the console it says document mode 7. In Emulation it is also in 7. I switched to 8 and the Console says in the window.open line "There is no support for this interface".

  • I haven’t seen the bug yet. I tried all the examples you posted and they all opened the popup.

  • The machine is without Adm access, can influence ?

  • I tested it on a machine with Adm access and it worked.. I think it has to do with permission. I’ll take a look and if that’s really delete the question.

Show 5 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.