PDA

View Full Version : Javascript Help with Popup window



fmrock
09-27-2007, 05:54 PM
I have the following link in my ASP page. Which has a list of multiple images.



<a href="chart.asp?ID=<%=chart%>" target="_blank">Chart</a>


Is it possible to have whatever link is click load in the same broswer.

So if the user minimizes the new window now and clicks another link... they will have 2, 3, 4 and so on windows open. I would only like the list... and then 1 extra window for the chart.

Thanks for any help you provide

jscheuer1
09-28-2007, 04:01 AM
target="_blank" means a new window distinct from any existing window. If you were to use a name instead, like:

target="bob"

and use the same name for all of the links, they will reuse the existing named window if it is already open:


<a href="http://www.google.com" target="bob">Google</a><br>
<a href="http://www.yahoo.com" target="bob">Yahoo</a>

That's just straight HTML, no javascript required unless you want to control other aspects of the new window. Even with javascript, if you target the same window each time, it will be reused if open.