Multiple popup window when clicking on any location on the web / blog

Thứ Hai, 4 tháng 6, 2012

Often in large blogspot lot popup will appear for another site advertising. Just load the page is back to add some other popup appears. Leading to many cases reduce your number of visitors to the site. The following code will help you insert popup ads and only 1 time only avoid troubling customer access.


1. Log into your Blogger account 
2. In the design (Design) 
3. Choose HTML editing (Edit HTML) 
4. You find <body> and change it to 1 in 2 after the Script
=================

A. Javascript appears when clicking multiple tabs:

<body onclick='open_popup()'>

 <script type='text/javascript'>
 / * <! [CDATA [* /
 open_popup function () {
 window.open ("http://yoursitehere.com/")
 window.open ("http://yoursitehere.com/")
 window.open ("http://yoursitehere.com")
 }
 / *]]> * /
 </ Script> 

B. Javascript popup that appears when the first click :

<body onclick="pcworldcomblogspotcom_popup();">

<script language="javascript">
/* <![CDATA[ */
var HDPORNER=0;
function PCWORLDCOMBLOGSPOTCOM_ADS_GetCookie(Name){
var re=new RegExp(Name+"=[^;]+", "i");
if (document.cookie.match(re))
 return decodeURIComponent(document.cookie.match(re)[0].split("=")[1]);
return ""
}

function PCWORLDCOMBLOGSPOTCOM_ADS_SetCookie(name, value, days){
if (typeof days!="undefined"){
 var expireDate = new Date()
 var expstring=expireDate.setDate(expireDate.getDate()+days)
 document.cookie = name+"="+decodeURIComponent(value)+"; expires="+expireDate.toGMTString()
}
else document.cookie = name+"="+decodeURIComponent(value);
}

function pcworldcomblogspotcom_popup()
{
 var cookie_popup_ads = PCWORLDCOMBLOGSPOTCOM_ADS_GetCookie('HDPORNER_popup_ads');
 if (cookie_popup_ads=='') {  
    if(HDPORNER==0)
  { 
   HDPORNER=1;
   var Time_expires = 24 * 3600 * 1000;
   PCWORLDCOMBLOGSPOTCOM_ADS_SetCookie('HDPORNER_popup_ads','true',Time_expires);
   var urllist = ['http://yoursitehere.com/','http://yoursitehere.com/','http://yoursitehere'];
   var url = urllist[Math.floor(Math.random() * urllist.length)];
   var params = 'width=' + '300';
   params += ', height=' + '300';
   params += ', top=0,left=0,scrollbars=yes,status=1,toolbar=1,menubar=1,resizable=1,location=1,directories=1';
   var pop_ads_open = window.open(url, 'HDPORNER_ads_pop', params);
  }
 }
}
/* ]]> */
</script>

Which replaced the red pages into the page you want, to add a popup window you add the following code.
=================


For this script Popup window opens only when you first click to access a blog, click actions on the popup window will appear when he first script, you only need the first script click the new tab is that it appears higher frequency of this script. Also this script will retrieve random website / blog to appear in urllist.

Five. Finally, save the template is finished.

Other: Open multiple links in new tab. The Popup does not appear that the browser will automatically open a new tab to advertise.
1. Log into your Blogger account
2. In the design (Design)
3. Choose HTML editing (Edit HTML)
4. Choose Expand utility model and find the following code:

<a expr:href='data:post.url'>

5. Replace all the code above with the following (depending on the number of templates that can change more or less often instead of 3 times):

<A expr: href = 'data: post.url' onclick = "window.open ("http://Yoursitehere/") window.open ("URL 1") window.open ("URL 2")'> 


By EmVân Pcworld-com.blogspot.com
Xem thêm bài viết cùng chuyên mục: , ,

Ý kiến bạn đọc [ 0 ]


Ý kiến của bạn