VB/JScript questions

Status
Not open for further replies.
I've built a simple little web site that basically just pulls data from an Access database and displays it. I've also put in the ability to add/edit/delete records. No problems so far.

For my add/edit/delete, I've got a jscript that pops open a new window with my form. At the moment, after I press submit on the form, it displays a message saying the database was updated. Then I have to manually close the pop-up window and press refresh on the window where my data is displayed. What I would like it to do, is display this message for, say 1 second, then close this pop-up window and refresh the window where my data is displayed.

I'm new to this and most of my "code" is copying samples and modifying. :)
 

Telematx

Ars Tribunus Militum
2,841
code:<HR>
Code:
<script language="javascript" type="text/javascript">
<!--
var closeTimer = null;<P>function CloseWin() {
    top.window.close();
}<P>function AllDone() {
    top.window.opener.document.location.refresh();  // refresh the main window document
    closeTimer = setTimeout("CloseWin",1000);  // close the window after a short delay.
}<P>//-->
</script>

Use the script above, and just call the AllDone() function.
 
Status
Not open for further replies.