0

this is my code:

<html>
   <body>
       <form>
           .....
           <button type="submit">Submit</button>
       </form>
   </body>
   <script type="text/javascript">
        window.onbeforeunload = confirmExit;
        function confirmExit()
        {
            return "...";
        }
    </script>
</html>

I want to confirm only when I click the browser X not when I submit the form. What change? Is possible?

monchyrcg
  • 372
  • 1
  • 6
  • 16
  • In my case that solution did not work. I have tried it. – monchyrcg Oct 28 '15 at 16:03
  • What doesn't work about it? You need to provide more details then. – Schleis Oct 28 '15 at 16:12
  • when I click on submit my confirmation appears. When I click submit button I want reload without confirmation, the other post only change the confirm text. I think is a different question. It isn't a duplicate question – monchyrcg Oct 29 '15 at 07:27

0 Answers0