• Post Reply Bookmark Topic Watch Topic
  • New Topic

Closing browser window without Javascript  RSS feed

 
satyanarayana bnv
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Is there any way to close the browser window in JSF without using Javascript window.close().
 
Himanshu Gupta
Ranch Hand
Posts: 598
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have not encountered such a functionality in JSF till now. Why do you want to close the browser window? And what is the problem in using JavaScript? I just asked for my better understanding of your requirements.
 
satyanarayana bnv
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When Javascript is disabled this functionality fails. So we are going for JSF functionality.
 
Himanshu Gupta
Ranch Hand
Posts: 598
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Even if you are going to JSF for this... It is going to use JavaScript because whatever you do at the client side have to be done with some sort of scripting. (Please correct if there is some other way to do it.)

JSF generates a lot of JavaScript code which can be seen by viewing the source of the page generated at the client side. I will suggest you to change your idea and to opt for some other way which will invalidate the session and tell the user to close the window. Moreover it is not considered as a good practice to play around the users browser without his permission. Try to give user a better and easy to handle website. Don't tie them into your rules but use their will to make suggestions.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!