1
<a href="#" onClick="window.open('pagina.html','pagename','resizable,height=260,width=370'); return false;">Clique aqui</a><noscript>Você precisa estar com o javascript ativado, caso contrário <a href="pagina.html" target="_blank">clique aqui</a></noscript>
thanks friend!!
– luendrio barbosa
the more you’re opening my own website?
– luendrio barbosa
how do I open another?
– luendrio barbosa
in place of
pagina.html
you can specify a url address– Ronny Amarante
ok vlw!! Mt thank you
– luendrio barbosa
The location where you specify the desired address is in the attribute
href
, of the element<a>
...– MagicHat
@Magichat, the new window opens using javascript. That’s why
#
within thehref
. In this case, you need to specify inside the onclick itself. This way, you can test in the browser as follows:window.open('http://www.google.com','pagename','resizable,height=260,width=370');
– Ronny Amarante
friend,now here another question,how do I apra when I close that screen,the page update alone?
– luendrio barbosa
@Ronnyamarante the two forms, are correct, depending on the organization of the project, one will be the best option.
– MagicHat
@Magichat, I made a test here to show you. Take a look, pls: http://jsbin.com/lonipasoco/edit?html,output
– Ronny Amarante
@Ronnyamarante what exactly you wished to show ?
– MagicHat
@Magichat; which prevails. Mainly because you will never apply this inline. If your js has not been loaded, it will just forward to href without opening in a new window.
– Ronny Amarante
@Ronnyamarante veja a edição que fiz na minha resposta, na parte do javascript, onde uso
this.href
and understand my point of view.– MagicHat
@Magichat; If js is not enabled you don’t need fallback
noscript
, in your case it will open in a new tab the content. If the JS has not yet been loaded, it will open in a new tab, not following the proposal of the question. In your code I see no need tonoscript
and you?– Ronny Amarante
@Ronnyamarante No, there is no need, it is even better. It is explained, why the
href
be a better way, in my view... "Socratic" method always works, for both involved... vlw, man ;)– MagicHat