Hi fsze88
Doesnt work..
setTimeout("closeWindows()
Once the button is clicked, the child window immediately closes.
Main Topics
Browse All TopicsHi!
I have 2 ascx pages coded for sharepoint.
1: There is a hyper link that when clicked, will launch a new window via javascript: showModalDialog.
2: The ascx page that the new window is shown. There are just some buttons etc to save back to database.
Problem:
When the hyperlink is clicked, the window appears. I then click on the button to save and attempt to close the window using window.close. But this is happening way too fast for my button to process some stuff before closing.
I've tried to use a while loop, do loop, but currently i am using a for loop... Looks a bit stupid... but i've totally no idea how to "slow" down the javascript... Any advice?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
One way to 'slow down' your javascript is to call an intermediate page instead of calling your actual target. So for e.g. if your 'Save()' call is targeted at ProcessDatabase.aspx - instead of calling ProcessDatabase.aspx - call an 'IntermediateSave()' in 'Intermediate.aspx'. This intermediate page will do two things -
1) It will actually call the target 'Save' in ProcessDatabase.aspx
2) It will introduce a delay along with the call
If you want a code-snippet, try this page:
http://www.velocityreviews
Let me know if that works for you.
Business Accounts
Answer for Membership
by: fsze88Posted on 2009-08-14 at 00:31:54ID: 25095837
please try ",2000);
setTimeout("closeWindows()