Login
Register
Tutorials
Forum
Career Development
Resources
Reviews
Jobs
Interview
Communities
Projects
Training
Silverlight Games
|
Bookmarks
|
New Members FAQ
|
Mentor
|
Code Converter
|
IT Companies
|
Peer Appraisal
|
Members
|
Revenue Sharing
|
Computer Jokes
|
New Posts
|
Social
|
Online Members
Kapil
More...
Forums
»
.NET
»
JavaScript
»
how to run sql before window is closed. URGENT. HELP!
Posted Date:
12 Jul 2006
Posted By::
Sushweta Biswas
Member Level:
Bronze
Member Rank:
0
Points
: 2
Responses:
1
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
Tweet
Responses
#62818 Author:
arjun
Member Level:
Gold
Member Rank:
0
Date: 12/Jul/2006 Rating:
Points
: 2
Hi
try with asynchronous method in .net
arjun-
#62865 Author:
Sushweta Biswas
Member Level:
Bronze
Member Rank:
0
Date: 13/Jul/2006 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???
Post Reply
This thread is locked for new responses. Please post your comments and questions as a
separate thread
.
If required, refer to the URL of this page in your
new post
.
Tweet
Next :
It is possible vbscript and javasript in same page
Previous :
assigning a value to label from javascript
Return to Discussion Forum
Post New Message
Category:
Related Messages
how to validate the checkedlistbox thru javascript
It is possible vbscript and javasript in same page
Active Members
Today
Pawan Awasthi
(46)
naveensanagase...
(21)
Kapil
(13)
Last 7 Days
naveensanagase...
(224)
Pawan Awasthi
(190)
Naved Hasan ...
(189)
more...
Awards & Gifts
Email subscription
.NET Jobs
.NET Articles
.NET Forums
Articles Rss Feeds
Forum Rss Feeds
Talk to Webmaster Tony John