• Hello friends,

    how to open links in new tab but the visitors stayed on the same page ??

    actually what i am looking is when someone clicks on ads on my website then the ad will open in new tab but the visitors stayed on the same page.

    i have also used that code. click on below link to see the code –

    code

    and its working fine but i am getting 1 problem using that code and the problem is that it opens new tab before the already opned tab on which the user is already stayed..

    so please help me to solve this problem…….

    Thanks in advance….

Viewing 3 replies - 1 through 3 (of 3 total)
  • Your code can be rewritten with the target attribute

    <a href="https://google.com" target="_blank"><img src="https://www.google.co.in/logos/doodles/2015/126th-anniversary-of-the-public-opening-of-the-eiffel-tower-4812727050567680-hp.jpg" /></a>

    This should work keeping your visitors on the same page while the ad opens in a new tab/window.

    Thread Starter Rockster2122

    (@rockster2122)

    @ thecodeisclear,

    yes i know that the above code is working but after using that code i am getting this problem –

    for ex-

    tab windows – 1 2 3

    there are 3 tabs in mozilla..

    so now my website is open in 2 tab and i want when someone clicks an ad on my website which is opened in 2 tab. the ad will open in the 3rd tab.

    but after using the above code ad is opening in the 1 tab..

    that’s the problem….

    so is there anyway to open the ad in 3rd tab…..& user stayed on 2 tab which is my website.

    Hi,

    The issue seems hard to replicate at my end. It would help to see the issue that you are facing. Can you send me a link to your site?

    Thanks,
    Ramesh

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to open links in new tab but…’ is closed to new replies.