Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

jump.cgi to both the url AND detailed page

Quote Reply
jump.cgi to both the url AND detailed page
Hi Everyone,

I want the jump.cgi to open the link URL in the same window and the detailed page in a new window. I currently accomplish this by adding this code to the top of the include_common_head.html template:
Code:

<SCRIPT LANGUAGE="JavaScript">
function DOpen(site1, site2) {
window.open(site1);
window.location = site2;
}
</script>

and then in the link.html template I use this code:
Code:
<a href="javascript:DOpen('<%build_root_url%>/Detailed/<%ID%>.html', '<%db_cgi_url%>/jump.cgi?ID=<%ID%>');"><%Title%></a>

Now, this works just fine for the most part when a user is on my site, but if a user recommends a link either through email or a social media recommendation I use the detailed page (<%build_root_url%>/Detailed/<%ID%>.html), so the actual url does not open in the background as it does on my site, and the 'hit' is not counted.

What I would like to do is have the jump.cgi do all the work by opening the link URL in the same window and the detailed page in a new window, so when someone shares a link on social media or email I would send (<%db_cgi_url%>/jump.cgi?ID=<%ID%>) and it behaves the same way as it does on my site. Possibly by building the same code above into the jump.cgi.

(Not looking for a lecture on pop-ups, ect... LOL)

Thanks,

George
Subject Author Views Date
Thread jump.cgi to both the url AND detailed page macbethgr 4691 Jun 13, 2015, 6:01 AM
Thread Re: [macbethgr] jump.cgi to both the url AND detailed page
Andy 4575 Jun 13, 2015, 6:33 AM
Thread Re: [Andy] jump.cgi to both the url AND detailed page
macbethgr 4565 Jun 13, 2015, 7:49 AM
Thread Re: [macbethgr] jump.cgi to both the url AND detailed page
Andy 4567 Jun 13, 2015, 7:57 AM
Post Re: [Andy] jump.cgi to both the url AND detailed page
macbethgr 4534 Jun 13, 2015, 9:28 AM