Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Problem of Javascript ( window.open & focus) in Bouned TaskFlow(JSFF) Bean with IE

2752424Mar 12 2015 — edited Mar 13 2015

I have noticed that if I have a Javascript window.open() and focus() functions inside of a Bounded TaskFlow  Bean, the popup window may open behind the current browser window.

the Workflow:

1. I have a <af:link text="New Page" id="l2" action="#{backingBeanScope.myBean.newPage}"/> tag in a JSFF page to call the function "newPage" in Class "myBean" (in backingBean Scope).

2. The "newPage" function will use window.open() function to pop up a new window and then use focus() function to focus the new window.


My Problem:

For FireFox, Chrome, they can open the new window foreground(in front of my current window). But for IE8 & IE9, the new window flashes once and then opens behind the current window.

My Current Solution:

My current solution is let the new page call Javascript window.focus() function when it onloads. It can get focused in IE now, but this happens after it flashes once, which seems very uncomfortable.

Would anyone know why this happens, and also be able to tell me how to get the popup window in this case, on top of the current browser window itself without flashes?

Many thanks.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 10 2015
Added on Mar 12 2015
2 comments
950 views