I’m working with php to make some web pages and I’m having a bit of struggle with a link I’m trying to make.
Basically I have my <a> set with target=”_self” on it so that it stays on the same page. (Note the page is a new window and that I also tried using “_top” and “_parent”)
<a href="http://ordi-003/inclusion/fiche.dos.assorti.info.php?id=<?php echo $donnees[0]['NoIdentDosAssorti'] ?>&lan=<?php echo $_SESSION['lan'] ?>" target="_self"><img src="<?php echo $donnees[0]['id2_pathImgMini'] ?>" width="75" height="75" /></a>
This is said link in its php form.
<a href="http://ordi-003/inclusion/fiche.dos.assorti.info.php?id=14&lan=fr" target="_self"><img src="../images/propriete/DosAssorti/mini/L482_mini.jpg" width="75" height="75" /></a>
This is the result arcoding to the browser when showing the source code.(Across IE,Firefox,Chrome)
<a target="_blank" href="http://ordi-003/inclusion/fiche.dos.assorti.info.php?id=14&lan=fr">
This is the same line according to Firebug AND the Chrome developping tools.
When clicking the linking the expected result is opening the link on the same page, however it opens it in a new window. Changing inside firebug “_blank” to “_self” and clicking the link afterwards gives the good results and opens the link on the same page.
Am I doing something wrong? Am I incorrectly using the <a> here?
Should I look for another way to make my link? I’m pretty open to anything really I tried different things and looked alot on google but couldn’t find people with the same problem. Firefox cache is deactivated so that should not be the issue. Tried it on another computer too and it gives the same results.
If I gave too short information just tell me what I should also include as I am new to stack overflow.
Edit:I forgot to say that if I remove the target parameter and just put none, the “source code page” doesn’t show anything like it should but in firefug and chrome dev tools it shows a target=”_blank” still. Also just a note, there is only 1 copy of this file and it is on the localhost of the machine running the local site. I’m directly editing that file.
Edit2: http://pastebin.com/yrAMQEL9 be aware the indentation is awful on pastebin for some reason.
I finally found what was causing the replacement of my _self.
In the footer there was a script which was referenced and trough further research I found this bit of code
It caused the replacement of the _self to a _blank.
Now that I know where the problem came from I just have to check with the original coder of that function why he needed it and if it is still needed.
Thanks all for your help.