File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Elasticsearch in Action
this week in the
java script problem
Joined: Apr 05, 2006
Dec 13, 2006 08:18:00
I have a data grid and 2 buttons on a page, when a user cancels the window, i want to displat a popup asking the whethere they are sure they want to cancel.
i currently have
event.returnValue = "You will loose all unsaved changes, please update details before closing the window.";
i call this function on the body like
<body bgColor="#ffffff" MS_POSITIONING="GridLayout" onbeforeunload="SaveChanges()">
Problem is, this message comes up even when clicking the buttons on the page, which is wrong, i want it to happen only when the user closes/cancels the window. Please help
Joined: Apr 14, 2004
Dec 13, 2006 08:26:00
Joined: Nov 08, 2001
Dec 13, 2006 08:47:00
Please do not post in multiple forums....
Closing this topic: Post continues here:
subject: java script problem
Windows XP Popup blocking
not able to redirect to html file from a jsp
major problem with html:cancel and html:submit
Session destroy on window close
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015