danip1983:
Primero te advierto que tu sistema tiene algunas inconsistencias, tené en cuenta que muchos de los navegadores vienen configurados para abrir las nuevas ventanas (target='_blank') en un nueva pestaña, por lo cual no verías las ventanas multiples al mismo tiempo, que sería lo aconsejable.
Por otro lado estás abriendo directamente la imagen como destino del link, y lo ideal sería que fuese un html que contenga un <img>.
De todas maneras te doy una técnica par ahacer lo que quieres
Esta es la página que abre el pop_up
abrir_popup.html
Código HTML:
Ver original<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <script type="text/javascript"> //<![CDATA[
var win= null;
function VentanaCentrada(pagina,w,h,nombre){
var winleft = (screen.width-w)/2;
var wintop = (screen.height-h)/2;
caracteristicas='height='+h+',width='+w+',top='+wintop+',left='+winleft+',scrollbars=no,toolbar=no,resizable=yes'
win=window.open(pagina,nombre,caracteristicas)
if(parseInt(navigator.appVersion) >= 4){win.window.focus();}
}
//]]>
<a href="html2.html" onclick="VentanaCentrada('html2.html','400','400','Popupuno');return false;" > Abrir Popup
</a>
esta es el pop up
html2.html
Código HTML:
Ver original<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es" lang="es" > <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <a href="img.html" target="_blank">mostrar publicidad
</a>
y este el html que contiene la imagen y a su vez cierra el popup
Código HTML:
Ver original<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es" lang="es" > <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <script type="text/javascript"> //<![CDATA[
self.opener.close();
//]]>
<p>Aqui iría la imagen
</p>
La solución ideal sería que tu html con la imagen sea un nuevo popup generados desde el primer popup
Saludos
![Porras](http://static.forosdelweb.com/fdwtheme/images/smilies/porra.gif)
![Porras](http://static.forosdelweb.com/fdwtheme/images/smilies/porra.gif)
![Porras](http://static.forosdelweb.com/fdwtheme/images/smilies/porra.gif)
![Porras](http://static.forosdelweb.com/fdwtheme/images/smilies/porra.gif)
![Porras](http://static.forosdelweb.com/fdwtheme/images/smilies/porra.gif)