I have an Ebase form that is being called by a Powershell script on a regular basis.
Is there a way to auto close the form/browser window once it has completed without user interaction.
auto close a form/browser window without user interaction
Moderators: Jon, Steve, Ian, Dave
-
- Ebase User
- Posts: 201
- Joined: Fri Dec 20, 2013 1:29 pm
- Location: Dartford Borough Council
- Contact:
-
- Moderator
- Posts: 1342
- Joined: Wed Sep 12, 2007 12:49 pm
You need to run some Javascript on the client to close the window, something like window.close(), but I think there are some technical issues with this. From an Ebase point of view, you could set up a new page, add an HTML control containing:
then just go to the new page.
But as I said above, you may find that window.close() doesn't do the job for some reason. You may need to google the exact Javascript to use.
Code: Select all
<script type="text/javascript">
window.close();
</script>
But as I said above, you may find that window.close() doesn't do the job for some reason. You may need to google the exact Javascript to use.
0 x
-
- Ebase User
- Posts: 649
- Joined: Mon Dec 09, 2013 6:37 pm
I do something very similar to what Jon suggested. I put an HTML control on the page that I want to close and don't enter any HTML at the time that I add it to the page. When it is time to close it, I do something like this in the JavaScript event:
This will immediately close the window
Code: Select all
control.CLOSEWINDOW.htmlText.setText('<HTML><BODY><SCRIPT>window.close();</SCRIPT></BODY><HTML>');
0 x
-
- Ebase User
- Posts: 201
- Joined: Fri Dec 20, 2013 1:29 pm
- Location: Dartford Borough Council
- Contact:
Thanks for the pointers
I got it to work with the following code:
<script>
window.top.close();
</script>
Many thanks
Neil
<script>
window.top.close();
</script>
Many thanks
Neil
0 x
-
- Ebase User
- Posts: 118
- Joined: Tue Oct 23, 2012 7:01 am
- Location: The Netherlands
-
- Ebase User
- Posts: 331
- Joined: Mon Mar 10, 2014 8:34 am
Just another approach.
We have a series of .net web services (outside of Ebase) that integrate various systems.
We have some Ebase form writers who needed a mechanism to regularly call Ebase forms that don't require human interaction. We were using Ebase scheduler but support for using multiple approaches was problematic.
Solution, we have a .net web service that calls Ebase forms via HttpWebRequest/HttpWebResponse (could equally well be Powershell Invoke-WebRequest).
The issue was that the response was only the browsercheck web page and the actual form wasn't being called, as we have an Ebase 'intergration' environment we were able to set Ufs.skipBrowserAttributesCheck=true which means the actual form is called without browser and the web service can interrogate the response and process accordingly.
We have a series of .net web services (outside of Ebase) that integrate various systems.
We have some Ebase form writers who needed a mechanism to regularly call Ebase forms that don't require human interaction. We were using Ebase scheduler but support for using multiple approaches was problematic.
Solution, we have a .net web service that calls Ebase forms via HttpWebRequest/HttpWebResponse (could equally well be Powershell Invoke-WebRequest).
The issue was that the response was only the browsercheck web page and the actual form wasn't being called, as we have an Ebase 'intergration' environment we were able to set Ufs.skipBrowserAttributesCheck=true which means the actual form is called without browser and the web service can interrogate the response and process accordingly.
0 x
Who is online
Users browsing this forum: No registered users and 21 guests