Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8046703
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T05:52:33+00:00 2026-06-05T05:52:33+00:00

I’m working with php to make some web pages and I’m having a bit

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T05:52:36+00:00Added an answer on June 5, 2026 at 5:52 am

    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

    jQuery('a[href^=http]:not(.in)').attr({
        'target' : '_blank'
    });
    

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have just tried to save a simple *.rtf file with some websites and
Basically, what I'm trying to create is a page of div tags, each has
this is what i have right now Drawing an RSS feed into the php,
I'm trying to create an if statement in PHP that prevents a single post
I am trying to loop through a bunch of documents I have to put
I have some data like this: 1 2 3 4 5 9 2 6
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.