Hello there, this is my script var puShown = false; function doOpen(url) { if ( puShown == true ) { return true; } win = window.open(url, 'wmPu', 'toolbar,status,resizable,scrollbars,menubar,location,height=680,width=790'); if ( win ) { win.blur(); puShown = true; } return win; } function setCookie(name, value, time) { var expires = new Date(); expires.setTime( expires.getTime() + time ); document.cookie = name + '=' + value + '; expires=' + expires.toGMTString(); } function getCookie(name) { var cookies = document.cookie.toString().split('; '); var cookie, c_name, c_value; for (var n=0; n<cookies.length; n++) { cookie = cookies[n].split('='); c_name = cookie[0]; c_value = cookie[1]; if ( c_name == name ) { return c_value; } } return null; } function initPu() { if ( document.attachEvent ) { document.attachEvent( 'onclick', checkTarget ); } else if ( document.addEventListener ) { document.addEventListener( 'click', checkTarget, false ); } } function checkTarget(e) { if ( !getCookie('popundr') ) { var e = e || window.event; var win = doOpen('http://www.google.com'); setCookie('popundr', 1, " . $popexpire . "); } } initPu(); Code (markup): can someone please tell me how i can make this popup code to open 2 websites disame time ? example to open www.google.com and www.yahoo.com Thanks
You can do this function checkTarget(e) { if ( !getCookie('popundr') ) { var e = e || window.event; var win = doOpen('http://www.google.com'); var win2 = doOpen('http://www.google.com'); setCookie('popundr', 1, " . $popexpire . "); } } HTML:
hi there, i try your code but didnt work can you please take a look, he open just the first link not and the win2