Hi All,
I have a long form in my web page.
When the users attempt to close the browser window, a confirm box pops up asking them two things: 'Click yes to save and close the window' and 'Click no to close the window without saving'.
with two buttons for yes and no.
Now if the user clicks the yes fast enough, then my sql script to save the data in the form to the database doesn't process completely.
So what i need is to first execute the entire sql script, meanwhile showing a message to the user as saving...., and then close the window.
Thanks for any help.
Sushweta
|
| Author: arjun 12 Jul 2006 | Member Level: Gold | Rating: Points: 2 |
Hi
try with asynchronous method in .net
arjun-
|
| Author: Sushweta Biswas 13 Jul 2006 | Member Level: Bronze | Rating: Points: 2 |
Hi,
I am sorry but i forgot to mention that it's an classic ASP page. So I'll have to check that all the sql queries have executed and then pop up an alert msg to the user as 'Data Saved Successfully' and close the window.
This is my javascript function:
function returnValue() { var sMsg1; var sMsg2;
sMsg1 = "Click Yes to save and close the survey"; sMsg2 = "Click No to close without saving the survey";
var ch = returnConfirmDialog (sMsg1, sMsg2, 36, "Confirmation"); if (ch == 6) { document.forms[0].btnSave.click(); if (bSave == true) { alert("Data has been saved successfully"); return true; } } else { return; } }
Now the issue is how do i make sure that sql queries have executed from my javascript function.
Please help???
|