jQuery in Action, 2nd edition*
The moose likes JSF and the fly likes How to open Small Window Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "How to open Small Window" Watch "How to open Small Window" New topic

How to open Small Window


Joined: Nov 29, 2006
Posts: 29

I am using JSF Components.
So, i need to know how to open small window when i click Command Button or Command link in my webpage.

Eric Pascarello

Joined: Nov 08, 2001
Posts: 15376
You have to use JavaScript to create a pop up window.

Ranch Hand

Joined: Nov 22, 2008
Posts: 18944

Joined: Nov 29, 2006
Posts: 29

Thanks for the reply. I am using window.open for this.
Its working fine now.
This is my code,

function fun() {
top.consoleRef=window.open('#{facesContext.externa lContext.requestContextPath}/main/patient/patient.jsf','myconsole',

When i click Save command button, the small browser window is opening.
but its opening like browser, i want to open an window with my own custom title at the top of the window.
How to solve this.

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60785

"vinutha ml",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

JavaRanch Sheriff

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
rajani varma
Ranch Hand

Joined: Dec 21, 2006
Posts: 30
Hi Vinutha,
This is my javaScript function to open a new window and if it is not closed, and the button is clicked again, the already opened window is focused, instead of opening a new second window.

Hope this helps

I agree. Here's the link: http://aspose.com/file-tools
subject: How to open Small Window
Similar Threads
making the command prompt window smaller
startup.bat not working properly
My pony tripped over the first gopher hole..
System.out.println("starting loop"); in jsp page
rundll problem