ปรับปรุง Swingads

ปรับปรุง Swingads

testtest

Movie Music MP3 File Sharing

free download and share your mp3 and video for kzshare member



ปรับปรุง Swingads



 
Post new topic   Reply to topic    Movie Music MP3 File Sharing Forum Index -> Amari
View previous topic :: View next topic  

Author Message
Royter
Royter is Avatar | ฝากรูป
Site Admin
Joined: 30 Jul 2009
Posts: 660

PostPosted: 02.04.2010, 10:57    Post subject: ปรับปรุง Swingads

โค้ดนี้จะเป็นการปรับปรุง Swingads นะครับ ซึ่ง โค้ดตัวนี้ จะทำการเปิด iframe เรื่อยๆ ตามลำดับ จนครบ โดยจะทำ iframe ถัดไป เมื่อโหลด iframe นั้เสร็จได้ ซึ่งโค้ดนี้ เจ๋งมากๆ ลองใช้แล้วทำให้หน้าเวปโหลดไวขึ้นเยอะเลยครับ

Code:

<script language="javascript">

var memoryDIV = "";
var memoryRECORD = "";
var currentloop = 0;
function repeatads(divrepeat){


   memoryDIV = document.getElementById(divrepeat).innerHTML;
   memoryRECORD = divrepeat;
   document.getElementById(divrepeat).innerHTML = "";
   window.setTimeout("runads()",1000);
}
function runads(){
var divinput = memoryDIV;
var popunder=new Array()
popunder[0]="http://ad.reachjunction.com/st?ad_type=iframe&ad_size=300x250&section=800655";
popunder[1]="http://ad.globaltakeoff.net/st?ad_type=iframe&ad_size=300x250&section=833790";
popunder[2]="http://marketplace.dexplatform.com/marketplace/delivery/display.php?f=728x90&w=728&h=90&o=923&s=1439";
popunder[3]="http://marketplace.dexplatform.com/marketplace/delivery/display.php?f=300x250&w=300&h=250&o=923&s=1439";
popunder[4]="http://ads.lfstmedia.com/slot/slot2121?ad_size=728x90&adkey=7b0";
popunder[5]="http://my.blueadvertise.com/delivery/dlvr_bannermedia.php?dimensions=300_to_250&parameters=1304";
popunder[6]="http://my.blueadvertise.com/delivery/dlvr_bannermedia.php?dimensions=300_to_250&parameters=1304";

//var randompop = Math.floor(Math.random()*(popunder.length));
var randompop = currentloop;
   document.getElementById(memoryRECORD).innerHTML = "";
      //document.getElementById("status").innerHTML = currentloop;

   document.getElementById(memoryRECORD).innerHTML = createiframe(popunder[randompop]);
   
   currentloop = currentloop+1;
   maxloop = popunder.length;
   if(currentloop > maxloop){
      document.getElementById(memoryRECORD).innerHTML = "";
   //window.setTimeout("repeatads(memoryRECORD)",10000);
   }
}
function createiframe(url){
   var text;
   text = '<iframe allowtransparency="false" frameborder="0" scrolling="no" onload="repeatads(\'ads\')" hspace="0"vspace="0"marginheight="0" marginwidth="0" width="468" height="60"src="'+url+'"></iframe>';
   return text;
   }
</script>
<div id="ads">

</div>

<script language="javascript1.1">
window.setTimeout('repeatads("ads")',2000);
</script>


วิธีใช้งาน แก้ ที่อยู่ของ iframe ตรง popunder[x] นะครับ
Back to top
View user's profile Send private message Send e-mail

Author Message
delpi
No member is Avatar | ฝากรูป
Joined: 30 Mar 2010
Posts: 3

PostPosted: 03.04.2010, 22:48    Post subject:

ขอบคุณครับ Surprised
Back to top
View user's profile Send private message

Author Message
xfiles
No member is Avatar | ฝากรูป
Joined: 28 Mar 2010
Posts: 3

PostPosted: 07.04.2010, 02:16    Post subject:

ขอบคุณครับ
Back to top
View user's profile Send private message

Display posts from previous:   

Post new topic   Reply to topic    Movie Music MP3 File Sharing Forum Index -> Amari All times are GMT + 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Designed by Bluepearl Design & phpBB-Styles.net