Welcome Guest 

Show/Hide Header

Welcome Guest, posting in this forum requires registration.





Pages: [1]
Author Topic: only trades open in new tab?
oceanude
Newbie
Posts: 11
Post only trades open in new tab?
on: June 8, 2020, 15:05

Hello,

Is there a way to make only skimmed clicks open in new tab? For example:

mysite.com/ftt2/o.php?u=/nextpage.php&s=50

when click goes to mysite.com/nextpage.php: nextpage.php opens in same tab
when click goes to trader.com: trader.com opens in new tab

Thanks!

admin
Administrator
Posts: 130
Post Re: only trades open in new tab?
on: June 8, 2020, 15:37

Hello,
it's possible with javascript.
you should listen on click event of your link, and prevent default action. After that make a ajax request to /ftt2/o.php?u=/nextpage.php&s=50&json=1
You will get response like
{
"url": "/nextpage.php"
}
Or {
"url": "http://sometrader.com"
}
So, you can analize this response and make a simple redirect in same window with window.location.href="/nextpage.php" or
open new tab with window.open

oceanude
Newbie
Posts: 11
Post Re: only trades open in new tab?
on: July 5, 2020, 07:46

Thanks for the clear reply, but that looks a bit too complicated to me. I hoped it could be done by editing the ftt2/o.php page

Pages: [1]
Mingle Forum by cartpauj
Version: 1.0.33.3 ; Page loaded in: 0.02 seconds.