Domanda

On Ipad or Iphone when I click on cancel in confirmation box ,after cancel touching tab or phone screen again prompts that confirmation box . Here is my code

<div data-role="view" id="message" data-title="Message" data-layout="default">
<a data-click="closeModalViewLogin" data-role="button" data-align="right">Close</a>
</div>

here is my javascript code

  <script>
    function closeModalViewLogin()
    {
    return confirm("Are u sure?")

    }

    </script>

Please give some suggession

È stato utile?

Soluzione 2

This is a known issue, unfortunately. Launching browser alert and confirm dialogs messes up the events sequence, resulting in the problem you experience. A common workaround we suggest is to wrap the confirm call in a setTimeout.

Altri suggerimenti

If you are using Phonegap then you can use

notification.confirm(....)
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top