Fail script execution

0

I have a script in javascript that runs correctly in Firefox but not in IE11, it is that after a certain if, I open a pop up: In php I have the following code:

if(xxxx){echo '<body onload="abrir()">';}

In the html page where the form is referenced to the php in head I have the following:

<script>
  function abrir(){  
    window.open('popup.html', '', 'top=500, left=500, width=700,height=700');
  }
</script>'

I have already enabled the popup in ie11, and I do not understand very well why it is not executed.

    
asked by carlos azañon 11.01.2018 в 09:21
source

1 answer

0

I think you need to put a title obligatorily in the parameters of the open function like this:

<script>
  function abrir(){  
    window.open('popup.html', 'TITULO', 'top=500, left=500, width=700,height=700');
  }
</script>      
    
answered by 11.01.2018 в 13:24