Open windows under current windows

Hi
below is clickunder code , but it open under windows when visitor click everywhere on the page
i need it be speacial for links , whenever visitor click on speacial link , it opens windows
please fix it

<SCRIPT LANGUAGE=“Javascript”>

function PopShow3() {
CookieTest=navigator.cookieEnabled; if(CookieTest)
{
ClickUndercookie = GetCookie(‘clickunder’);
if (ClickUndercookie == null)
{
var ExpDate = new Date (); ExpDate.setTime(ExpDate.getTime() + (1 * 60 * 60 * 1000)); SetCookie(‘clickunder’,‘1’,ExpDate, “/”);
window.open(“http://www.google.com”);
window.focus();
}
}
}

function GetCookie (name) { var arg = name + “=”; var alen = arg.length; var clen = document.cookie.length; var i = 0; while (i < clen) { var j = i + alen; if (document.cookie.substring(i, j) == arg) return getCookieVal (j); i = document.cookie.indexOf(" “, i) + 1; if (i == 0) break; } return null; } function SetCookie (name, value) { var argv = SetCookie.arguments; var argc = SetCookie.arguments.length; var expires = (argc > 2) ? argv[2] : null; var path = (argc > 3) ? argv[3] : null; var domain = (argc > 4) ? argv[4] : null; var secure = (argc > 5) ? argv[5] : false; document.cookie = name + “=” + escape (value) + ((expires == null) ? “” : (”; expires=" + expires.toGMTString())) + ((path == null) ? “” : (“; path=” + path)) + ((domain == null) ? “” : (“; domain=” + domain)) + ((secure == true) ? “; secure” : “”); }
document.onmouseup=PopShow3;

</SCRIPT>

Check if the target element that was clicked on is a link.

For example:


function handleOnclickEvent(evt) {
    evt = evt || window.event;
    var targ = targ.srcElement || targ.target;
    if (targ.nodeType === 3) { // Opera fix
        targ = targ.parentNode();
    }
    if (targ.nodeName === 'A') {
        // do link click stuff here
    }
}

}

Do i must add below codes to page ? if yes it doesnt works :frowning:

<script>
function handleOnclickEvent(evt) { evt = evt || window.event; var targ = targ.srcElement || targ.target; if (targ.nodeType === 3) { // Opera fix targ = targ.parentNode(); } if (targ.nodeName === ‘A’) { // do link click stuff here }
}
</script>

The code was designed to be illustrative, for yourself and any other scripters viewing this thread.

You will need to modify things to work in your own special circumstances. If you do not want to, or know how to, there are people that can be employed who can do it for you.

Or, you might just e lucky enough to find someone with the time and desire to create the perfect solution for you too.

Yes .i will pay someone can do it for me , but first of that please read exactly :

-I want open under windows , for speacial links , for example links have : id=openwin

-I need set cookies for it , after first click , more clicks go to normal href
<a href=link>sss</a>

-It means there is 2 links , first link in the script go to under windows and more clicks (after exp cookie) go links in the <a href=link>sss</a>

Please pm me , everyone can do it great and also with cost

I should clarify that the Marketplace really is the preferred place for this type of negotiation. Despite that though, a PM has been sent through.