File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes Doubt on target=_BLANK Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Doubt on target=_BLANK" Watch "Doubt on target=_BLANK" New topic
Author

Doubt on target=_BLANK

Padma Priya
Ranch Hand

Joined: Feb 01, 2007
Posts: 113
Hi All,

I have a doubt in html. I have a Jsp page and my requirement is i want a new window(say window A) to be opened only once i.e the first time i click on the submit button and on consequent clickings of submit button the results should be displayed in Window A itself instead of opening a new window every time i click on the submit button.

But each time i click on the submit button every time a new window gets opened resulting in a lot of clutter.

Could anyone one help me out with the problem.I have tried target=_blank
but unable to solve the problem

Thanks in advance

With Regards
Deepthi
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
The second parameter of window.open should be the window name. Are you setting that?

Eric
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61761
    
  67

Use the same window name on each target attribute.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Padma Priya
Ranch Hand

Joined: Feb 01, 2007
Posts: 113
Thanks for the reply.But there is a sendRedirect() call in the result.jsp which is causing a new window to be loaded every time i click the submit button
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
If the new page is loading the window, there is nothing you can do since it is impossible for the browser to maintain variables that are destroyed when the page is submitted.

Eric
[ December 19, 2008: Message edited by: Eric Pascarello ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Doubt on target=_BLANK