I have two jsps, one will be called from another. On updating some info on the second jsp, the first jsp should be refreshed, but the focus should be retained on the child (2nd) jsp.
Any suggestions on this.
FYI: refreshing the parent is most likely going to kill the parent child relationship since refreshing tha page destroys the window object that created the pop up window. There is no way to avoid this other then using frames which is ewww (a mess to maintain).
Other then that to answer your question, try using a timeout that fires the code. var timer = window.setTimeout("window.focus()",500);
I have a similar problem, and was wondering if there was an elegant solution.
I process a form in a pop-up window using Ajax. I would like to fire a:
This obviously refreshes the parent window, and then closes the pop-up. In order to get this to work asynchronously, I fire these calls in my ajax_update_resp() callback function. It works in IE, but (shockingly) crashes my beloved Firefox.
If I do:
I am not guaranteed that the opener window will pick up the changes in time. I have thought about a small delay, but ouch -that is exact opposite effect I was looking for by using Ajax.