i have a problem that i have looked at high and low today and am really interested to find an answer. I have opened a browser window from a java extension class written for an applet.... i.e
AppletContext a = getAppletContext(); URL url = new URL(link); a.showDocument(url,"URS");
This works fine and ofcourse there are other options for "_blank", "_self" etc, instead of naming it as i did above "URS"...
My issue is that if noone closes this window and it falls behind the application, then the next time the method is run and the url changes, the web browser updates but is not brought to the front.... this old application is built with AWT, i do not see a way to regain control of this browser and bring it to the front. "_blank" will pop up a new browser window BUT eventually if the user does not close the windows they will have a pile of windows open.... Why would they have an option to name it if i can't access it again?? I could really use a hand, or an explanation of why this works this way if i am trying to do something that is in left field!!!
Chris [ August 20, 2008: Message edited by: chris belyea ]
Joined: May 08, 2008
Hmmm, it looks like IE defaults the window to the front when you use
but Mozilla does not... either way my application does'nt do it. I somehow have to open a new (temporary) browser from a java class with a dynamic URL that the java class recieves and have this new window close onBlur>... but the trick is i do not control the code on the webpage we are going to....
I never seem to get responses on this board but i am really hoping someone can shed some light... I am using an applet to spawn the browser but maybe the solution to this has nothing to do with applets, perhaps i am posting this in the wrong place??
It is not clear, at least to me, what you are trying to accomplish.
If you open another window that displays a web page you have no control over, no matter how it is done, why would you think you should have any control over it, and why would you want to?
When you are talking about 'bringing it to the front' do you mean the new browser or tab? That is controlled by the browser and the user of the browser can change these settings on a whim, and in no case should a program that the browser runs(i.e. your applet) be able to 'control the browser'.
"Computer science is no more about computers than astronomy is about telescopes" - Edsger Dijkstra
Joined: May 08, 2008
hey rusty thanks for the reply.... My application is internal only... at the end of accomplishing a task, the applet opens a browser and goes to an internal url....
The users are lazy and want what they want, they don't want to follow our standard proceedures, so they don't bother closing the web page and then expect the next time the application accomplishes the same task, then that existing browser instance will again be brought to the forefront displaying the new information, but it does'nt, it just changes behind the scenes and they don't like that. I have argued blue in the face that we are not following standard practices BUT they don't care, nothing about the program is normal anyway so i needed to come up with some type of workaround but i can't seem to come up with anything.
The url we hit is dynamically assembled and passed to the applet.. i don't have access to the code from the web page we actually hit soooooo i was trying to control the browser, either bring it to front, or close it onBlur so that when it called showDocument the next time it would create a new browser instance and when that happens it always opens a new one on top... My problem basically lies in the fact that the user won't close the browser window on their own, and i have been told to fix it... :-(