Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to open Small Window

 
vinutha
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have to use JavaScript to create a pop up window.

Eric
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
vinutha
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64633
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"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
 
rajani varma
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic