• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Closing browser window without Javascript

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

Is there any way to close the browser window in JSF without using Javascript window.close().
 
Ranch Hand
Posts: 598
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic