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:
<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:
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
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