iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Hi,
I am using WebDeskTopManager with couple of shortcuts. On click of each shortcut, window opens up with required URL. I am using onbeforeunload event to check unsaved changes on page. It works for just about everything but if i make some change on page and click 'X' button of window to close it, window closes first and then prompt comes up asking for "do you want to save?" but by that time window is already closed so its too late. Is there a way to stop window from closing and ask for save? I tried using OnBeforeWindowClosed event but i get object expected error. In documentation, its being called on pageloaded event. But when i do that, nothing happens and on pageLoad event it gets error.
Any suggestion will be welcome.
Thanks.
Hi Sukhdepp Kaur,
Yes, the best way to do so is by using a client side event OnBeforeWindowClosed and make the return value into false. The object expected error is occured, perhaps, you did not specify the specific object. Attached is a sample code to show a WebDialogBox after we click on "X" button and asking for confirmation of closing the window.
I hope it helps and please do not hesitate to ask if you have any other questions. Thank you.
Best Regards,
Andi Santoso
Hi Andy,
Thanks for your reply. I tried the code you have provided. My issue is slightly different. OnBeforeClosed event i want to check if there are any unsaved changes on page, then show the prompt to ask user "if they want to save changes". If there are no unsaved changes then i dont need any prompt before close. But if i use webdialogbox like you have suggested, it will appear everytime user clicks 'X' on window. I am already checking for unsaved changes on the onbeforeunload event of page which is ContentURL of window. It works fine just shows the prompt after closing the window. I would like to send you code sample of what i am trying to achieve if you can kindly provide me with your email address.
Thanks,
Sukhdeep
Okay, now I understand the situation. Yes, it would be a really big help and appreciation if you would kindly to send the running sample into my email. You can send them to my email at andi@intersoftpt.com. Thank you and have a nice day.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname