javascript - jQuery: prompt user when attempting to refresh or close browser -
scenario: have web app let user 1 set values in form (#div1
) , display next user (who comes browser after user 1 without closing browser) (the display shown in #div2
while #div1
hidden). if user 2 refresh browser, values gone.
question: how can alert user when attempts refresh browser? web app on midori
, web server cherrypy
.
or there way save session regardless of refresh? , how?
are looking for
window.onbeforeunload = function(){ return "are sure want close window?"; }
Comments
Post a Comment