1

I want to close a document after someone has updated it.

I tried the following javascript in the submit button:

document.forms[0].submit(); window.close()

But the web-query-save agent doesn't fire then. But if I comment out the 'close', the WQS agent executes as expected but then I have the dreaded "Form Processed" page. I supposed I could but a nice page up but I'd like to just close the page. Any thoughts?

thanks clem

Clem
  • 395
  • 1
  • 13

2 Answers2

1

At the end of your WebQuerySave Agent you can print a message to output some javascript.

Print |<script type="text\javascript">| 
Print |window.close();| 
Print |</script>|
Ken Pespisa
  • 21,989
  • 3
  • 55
  • 63
0

I know this is 9 years old, but this solution didn't work for me.

Instead, I end my webquerysave agent with a Print statement back to the same document:

Print "[" + webDbPath + "/0/" + currdoc.Universalid + "?EditDocument&saveSuccess=true]"

I can then check for the saveSuccess in the URL on the onload and if found, close the window with: window.open('','_self').close();

Tyler2P
  • 2,324
  • 26
  • 22
  • 31