Jump to content
Killersites Forums

javanut

New Members
  • Content Count

    1
  • Joined

  • Last visited

Community Reputation

0 Neutral

About javanut

  • Rank
    New member
  1. I was able to get this script working, but now when form submit button is clicked the warning box appears. I only want the warning box if visitor trys to leave, etc. And I don't want the warning box when they click on submit. Anyone know how to make this so? var submitted = false; window.onbeforeunload = function() { window.onbeforeunload = null; location.assign('http://site.com); return "Stay here bla bla"; }; $("#formID").submit(function () { submitted = true; }); <form id="formID" method="post" action="http:
×
×
  • Create New...