Celso Azevedo
I folded Myself
Olá, alguem sabe como é que faço para quando clicar num link abrir uma nova janela com as dimensões de 500x400?
Obrigado
Obrigado
<script type=\"text/javascript\">
function abrepop()
{
var janela= window.open('rectecnico.aspx','_blank');";
if(janela)var popUpsBlocked = false;";
else {var popUpsBlocked = true;}";
if (popUpsBlocked)
alert('Popup bloqueada!')
}
</script>";
uma forma é através de javascript
poes este code no head do htmlCódigo:<script type=\"text/javascript\"> function abrepop() { var janela= window.open('rectecnico.aspx','_blank');"; if(janela)var popUpsBlocked = false;"; else {var popUpsBlocked = true;}"; if (popUpsBlocked) alert('Popup bloqueada!') } </script>";
este script abre uma janela nova de tamanho normal do teu browser, anbrindo nessa a pagina "rectecnico.aspx", onde tens "rectecnico.aspx" pões o nome teu html "*.htm"
este script tb detecta se tens os popups bloqueados , caso tenha envia a respectiva msg, pois so a consegues ver se os tivers desbloquados.
tens de chamar abrepop() no link da tua pagina atraves do metodo java script, que não me recordo com o é
espero que tenha ajudado
<html>
<body>
<a href="http://www.gmail.com" target="_blank">aqui<a>
</body>
</html>
[LIST]
[*]_blank - the target URL will open in a new window
[*]_self - the target URL will open in the same frame as it was clicked
[*]_parent - the target URL will open in the parent frameset
[*]_top - the target URL will open in the full body of the window
[/LIST]
<html>
<head>
</head>
<body>
<a HREF="http://www.google.pt" TARGET="_blamk" onClick="window.open('http://www.google.pt','_blank','width=200,height=200'); return false;">click click</A>
</body>
</html>
<html>
<head>
<script language = "JavaScript">
function abrepop()
{
var janela= window.open('http://www.google.pt','_blank','width=700,height=300');
if(janela)
{var popUpsBlocked = false;}
else
{var popUpsBlocked = true;}
if (popUpsBlocked)
alert('Popup bloqueada!');
}
</script>
</head>
<body>
<a HREF="http://www.google.pt" TARGET="_blamk" onClick="abrepop(); return false;">click click</A>
<!--<a HREF="http://www.google.pt" TARGET="_blamk" onClick="window.open('http://www.google.pt','_blank','width=200,height=200'); return false;">click click</A>-->
</body>
</html>