This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
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 OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 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: 15385
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 for this.
Its working fine now.
This is my code,

function fun() {'#{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: 63355

"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:
subject: How to open Small Window
jQuery in Action, 3rd edition