Problem style.display when doing document.form.submit on iOS

0

I have an html form that when sent shows a div that occupies the whole screen with a message of "sent ..." while the form is being sent. It works perfectly in all the browsers and versions I've tried, except on iOS devices, where it does not show me that div. The funny thing is that if I remove the line document.formulario.submit (); if it shows the div correctly, but of course, it does not send the form.

I have given a thousand laps but I can not understand why the iPad and the iPhone do not work.

This is the code I use:

<form name="formulario" id="formulario" method="post" action="mipagina.aspx?accion=Grabar" onsubmit="return ConfirmEnvio()">
        <input name="CadenaLins" id="CadenaLins" type="text"/>
        <input name="NumPedidoNEEnv" id="NumPedidoNEEnv" type="text" />
</form> 

<a href="#baja" class="hvr-fade" onclick="javascript:return ConfirmEnvio();">FINALIZAR PEDIDO</a>

<script type="text/javascript">
    function ConfirmEnvio(){
       // Mostramos mensaje 'cargando'
       document.getElementById('EnviandoFondo').style.display = 'block';
       document.getElementById('EnviandoVentana').style.display = 'block';

       //Enviamos el form.
      document.formulario.submit();
      return true;
    }
</script>

Thank you very much.

    
asked by user10092580 05.09.2018 в 18:13
source

0 answers