开发者

ExtJS: Ensure that user submit the form

I got several form when user can make various calculation. Forms provide results after user fills in input fields, when most of them or all are filled in onChange event will calculate and display result.

Results need to be saved by submiting the f开发者_C百科orm. Some of user are happy to see result and do not proceed with submit / save operation by closing browser or leaving the page.

How I can catch those action and enforce them to save operation in ExtJS ?


You could set up an event listener on the onbeforeunload event, testing to see if the user submitted the form or not. Check out:

https://developer.mozilla.org/en/DOM/window.onbeforeunload

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜