Home Answers Viewqa JSF-Questions how to focus on the new window opened from JSF ?

 
 


celia
how to focus on the new window opened from JSF ?
0 Answer(s)      a year and a month ago
Posted in : Java Server Faces Questions

Hi guys,

I have commandLink with action which using javascript to open a new window(window.open()). Problem is, the new window opens at background behind the current window that user has to look for it. Is there any way to open it at front and focus? Thx in advance!

Here is my code:

public void openTrackDetail() { 

   FacesContext fc = FacesContext.getCurrentInstance();

   String server=getMyServer();

   String jsLink = "window.open('" + server + "', 'trackIDView');";

   JavascriptContext.addJavascriptCall(FacesContext.getCurrentInstance(), jsLink);

}

View Answers









Related Pages:

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.