close web client navigator window

Using Servoy to administrate the content of your website? Discuss all webrelated Servoy topics on this forum!

close web client navigator window

Postby lesouef » Wed Apr 27, 2011 12:38 pm

How can I close the navigator window when exiting a web client session instead of going back to the web client welcome page?
I have an external app which is lauching a small web client app in an iframe and goes ahead only when the servoy app window closes, but servoy dos not allow a JS window.close().. or am I missing a detail?
close solution, closeform and application exit all send the user back to the web server welcome page...
lesouef
 
Posts: 420
Joined: Thu Oct 20, 2005 8:13 pm
Location: Strasbourg & Paris - France

Re: close web client navigator window

Postby ptalbot » Sun May 01, 2011 7:17 am

Code: Select all
plugins.WebClientUtils.executeClientSideJS("window.top.close();");

Just be aware that some browsers can prevent this call depending on the security level set by the user.
Patrick Talbot
Freelance - Open Source - Servoy Valued Professional
https://www.servoyforge.net
Velocity rules! If you don't use it, you don't know what you're missing!
User avatar
ptalbot
 
Posts: 1654
Joined: Wed Mar 11, 2009 5:13 am
Location: Montreal, QC

Re: close web client navigator window

Postby lesouef » Sun May 01, 2011 12:37 pm

forgot to mention, I fixed it without any plugin, by using showURL and a external htm page where I use a js to close the window in the _self target, but indeed, the navigator asks for confirmation, and this is beyond servoy's control...
I'll probably do that thing differently as the webclient sessions sticks on server even when closed, not yet clear to me why.
thanks anyway.
lesouef
 
Posts: 420
Joined: Thu Oct 20, 2005 8:13 pm
Location: Strasbourg & Paris - France

Re: close web client navigator window

Postby jcompagner » Mon May 02, 2011 10:31 am

if you call application.exit() the session should be killed on the server.

and just before you call application.exit() you can call application.showURL()
then the application should exist and go to the url you want.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: close web client navigator window

Postby lesouef » Mon May 02, 2011 11:22 am

application.exit() closes the solution but sends back to the root page of the server, which I fixed as indicated before by using an external page to close.
but the client session stays open on server, and I quickly reach my max amount of licences.
would it be because I am not using the integrated security login and logout?
killing sessions on server admin does not work any better.
I'll work on this a bit more later on, I have a db server which is down at the moment in this solution, and that may interfear as the solution is then missing a few relations, and if the solution crashes, maybe the server keeps the session open forever?
lesouef
 
Posts: 420
Joined: Thu Oct 20, 2005 8:13 pm
Location: Strasbourg & Paris - France

Re: close web client navigator window

Postby jcompagner » Mon May 02, 2011 11:28 am

so you are calling now:

application.showUrl(xxxxx)
application.exit()

if that is the case then the client should really be gone, if your clients stick then that is somehow a bug, do you have any logging in the servoy log file on the server?
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet


Return to Web Development

Who is online

Users browsing this forum: No registered users and 7 guests