• Post Reply Bookmark Topic Watch Topic
  • New Topic

javascript Window Manager  RSS feed

 
Jorge Montes
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

Here's the problem: my jee web application has to load an applet in a separate window after an action. I am using Richfaces 3.3.1 so the code goes something like this:



So far, so good, but, for some security reasons i must make sure that this window is going to be the only opened window of this kind. I am not that good in JS so this must be taken from the internet.

windowOpener.js



basically, this just keeps track of the opened windows in popupWins array and closes the opened one before open a new one. It actually works, but i have been getting some feedback from the users that sometimes it doesn't open the new window. They describe it like ...opens for just a second.

I think i may be loosing the popupWins variable afer some time. I don't know if that is possible.

They are using ie8 (i know). Can you give some advice?

Thanks in advance
 
Tim Holloway
Bartender
Posts: 18665
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
MUST you open a new window to do that?

Webapps that occupy multiple windows/panes are a real turn-off (or turn-away) for me for a number of reasons, and JSF isn't multi-window friendly in any event.

You may not be doing anything wrong, however. There are known bugs in various versions of Internet explorer relating to pop-up windows. They require installation or replacement of certain Windows DLLs to fix.
 
Jorge Montes
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are right, maybe another window isn't the right approach to this issue. I think a Richfaces modal panel will do the work just as fine. I still have to run some tests for the applet on the window. Nevertheless, i still wonder why this happens, is close to 3% of opening windows that crashes this way.

If they don't accept, i think user will have to close that window by themselves.

Should i put this issue as Resolved?

thanks for your time.
 
Tim Holloway
Bartender
Posts: 18665
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can certainly use a RichFaces dialog to pop up an applet over a JSF window. For that matter, you could even just use an overlay HTML div and show/hide it.

I didn't really try to analyze your original code too closely. There's a possibility that it does have race conditions. But, like I said, there are known problems with Internet Explorer, so even if you got everything else right, Windows itself would cause you problems. Worse yet, you can't really work around it in the app. It requires someone to actually update Windows.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!