Forums Register Login

open new browser window on click of button.

+Pie Number of slices to send: Send
hi,

on click of h:commandButton I have to open new window and show the result in dat window.
How to open new window on button click.

thanks
+Pie Number of slices to send: Send
go for onClick javascript event and call window.open with the required URL.
+Pie Number of slices to send: Send
Try to avoid popups. It's a question of style. Furthermore, there are popupblocker what may block your window. I hate popups. Is there really a reason not to show your result in the window you have?

+Pie Number of slices to send: Send
I have to call the action of commandButton in new window....

I have written the following code

window.open('popup.faces', 'popupWindowName', 'dependent=yes');


<h:commandButton action="#{reportBean.execute}" styleClass="buttonN" value="#{msg.report_exportreport_btnlabel}" onclick="openNewWindow();"/>


but I want the action to performed in the newly open page.
+Pie Number of slices to send: Send
Actions aren't performed "in" pages, they're performed "on" backing beans. Whether the page that's navigated to is in the same window or another one is a different matter. However, in my browser configuration, popup pages are either suppressed or open in invisible tabs, so design accordingly.
What do you have in that there bucket? It wouldn't be a tiny ad by any chance ...
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 4073 times.
Similar Threads
Open New Window
parent-child windows stuff
window no url loaction
opening new window in jsp
javascript closing windows
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 03:27:33.