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
Author

How to open Small Window

vinutha
Greenhorn

Joined: Nov 29, 2006
Posts: 29
Hi,

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.

Thanks,
Vinutha.
Eric Pascarello
author
Rancher

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

Eric
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
vinutha
Greenhorn

Joined: Nov 29, 2006
Posts: 29
Hi,

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',
'width=350,height=250'
+',menubar=0'
+',toolbar=0'
+',status=0'
+',scrollbars=1'
+',resizable=0')
top.consoleRef.document.close()
}

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.

Thanks,
Vinutha.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60785
    
  65

"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.

Thanks!
bear
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

-Rajani.
 
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