Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Doubt on target=_BLANK

 
Padma Priya
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The second parameter of window.open should be the window name. Are you setting that?

Eric
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64712
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use the same window name on each target attribute.
 
Padma Priya
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic