0
Hello!
I have that function here:
function mostrar(id){
window.location = "visualizar.php?id=" + id;}
That I call when the user clicks on a <a href="javascript:mostrar(id)" target="_blank"></a>
And I want me to open a new tab and not close the current tab.(No tab, like a pop-up) but it looks like the target="_blank"
is not working as usual. There is something to do in the javascript function to do this?
and what’s wrong with putting the url in the href attribute?
– Sampaio Leal
The code is a little more complex than that
– Nicolas S.
More complex than:
<a href="visualizar.php?id=5" target="_blank"></a>
Or using php variables:<a href="visualizar.php?id=$id" target="_blank"></a>
– Sampaio Leal
It’s just that there’s a database query, but I’ll try to simplify it this way
– Nicolas S.
A good, should talk about it, because you made it very clear that you are having trouble opening a new tab with Javascript, in a link
<a>
, did not specify anything else!– Sampaio Leal
Wow, you could really simplify hahahah. Thanks friend!
– Nicolas S.