wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes pop up window Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "pop up window" Watch "pop up window" New topic
Author

pop up window

Balaji Loganathan
author and deputy
Bartender

Joined: Jul 13, 2001
Posts: 3150
Hi,
Upon clicking a link in my parent window, I have used window.open() funtion to open a child window with specified width and height.
But if i click the link again in my parent window,its opening another new child window instead of reloading in the existing child window.
is it possible to avoid it.,
Regards
Balaji
Garann Means
Ranch Hand

Joined: Jan 28, 2002
Posts: 214
Balaji,
Could you post your code? It sounds as though your window is opened anonymously, so that the opener window isn't replacing the currently open child window.
g.
Balaji Loganathan
author and deputy
Bartender

Joined: Jul 13, 2001
Posts: 3150
Hi Garann,
Here is my javascript function code and html code

Please help.
Regards
Balaji
Anu Kha
Greenhorn

Joined: Aug 08, 2002
Posts: 3
Hi,
I copied the code into a html file nothing comes up. Can you please give a code which i can just paste into a file and give it.html extension and see what u r saying. I think this is to do with reclaiming the obj created.
Thanks
If you want to email it to me my email id is ak1303@hotmail.com


Please help.
Regards
Balaji[/qb]<hr></blockquote>
[ August 08, 2002: Message edited by: Anu Kha ]
M Suguna
Ranch Hand

Joined: Jun 07, 2002
Posts: 37
Hi
In your window.open() call, give a value in the second parameter. Change it to something like this..

It will reload the window instead of opening a new window everytime.


Who says nothing is impossible? I've been doing nothing for years
Balaji Loganathan
author and deputy
Bartender

Joined: Jul 13, 2001
Posts: 3150
Hi M Suguna,
Thanks a lot,its working now.
Thanks again.
Hi Anu,
Here the complete code, incase you would like to comment.

Regards
Balaji
[ August 08, 2002: Message edited by: Balaji Loganathan ]
Rob Hunter
Ranch Hand

Joined: Apr 09, 2002
Posts: 818
Hi All;
I've got a question that is somewhat related to this one. If I was using a window to simply write to it instead of linking it to an URL how do I replace the code in the window with new code. Right now I try doing this and the new code being written to it gets concatenated onto what is already there. Any suggestions? Thanks to any suggestions.
Rob
Matt Howard
Greenhorn

Joined: Jun 25, 2002
Posts: 10

the document.open() and close() methods should replace the existing document.
Rob Hunter
Ranch Hand

Joined: Apr 09, 2002
Posts: 818
Just came across, MUCH LATER I know. How do you declare the mywindow object? I'm basically using this window as a lookup window. Once a search is complete in the main window I send stuff to this window. On subsequent sends to the window (as I mentioned) things get concatenated on. Do you happen to have a small section of code to illustrate this. I should also point out that I want a bit of control over the open (i.e. statusbar on and resizable enabled). Thanks again.

Rob
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: pop up window