Hov. Du er ikke logget ind.
DU SKAL VÆRE LOGGET IND, FOR AT INTERAGERE PÅ DENNE SIDE

Script forståelse

Side 1 ud af 1 (1 indlæg)
  • 1
Fra Viborg
Tilmeldt 8. Nov 11
Indlæg ialt: 292
Fra  Beyblade-shoppen.dk Skrevet kl. 18:18
Hvor mange stjerner giver du? :

Hej jeg har fundet et script jeg gerne vil lære og forstå bedre?

Nogen der kan fortælle min hvordan det her virker, ved allerede havd det gør men hvordan virker det? :)

<script type="text/javascript">
function StartIt(){
var Shadow = document.getElementById("myads");
dv = document.createElement('div'); // create dynamically div tag
dv.setAttribute('id',"lyr1"); //give id to it
dv.className="top"; // set the style classname
//set the inner styling of the div tag
dv.style.position="fixed";
dv.style.pixelLeft=0;
dv.style.pixelTop=0;
dv.style.width="100%";
dv.style.height="100%";
dv.style.backgroundImage = "url(images/fade.png)";
//set the html content inside the div tag
dv.innerHTML='<div id="AdBox" style="height:481px; width:400px;"><div id="grey_video_box"><div id="CloseBox" onclick="CloseBox();"></div><div id="show_video_in_box">'+document.getElementById("InnerAd").innerHTML+'</div></div></div>';
var d = document.getElementById('outside');
var olddiv = document.getElementById("InnerAd");
d.removeChild(olddiv);
document.body.appendChild(dv);
setTimeout("document.getElementById('CanIClose').value = 1;",10000);
setTimeout("document.getElementById('CanIClose').value = 2;",40000);
}
function CloseBox(){
var Val = document.getElementById("CanIClose").value;
if(Val=="0"){
alert("Du skal lige se videoen først.");
}
if(Val=="1"){
alert("Du skal se mindst 30 sekunder af videoen.");
}
if(Val=="2"){
GoNextStep();
}
}
function GoNextStep(){
var dv = document.getElementById("AdBox");
dv.innerHTML = '<div id="ShareBox"><div id="CloseBox" onclick="CloseBoxAgain();"></div><div id="first_top"></div><div class="like_box_con"><div class="share_d_left"></div><div class="share_d_mid"><img src="http://profile.ak.fbcdn.net/hprofile-ak-snc4/372821_184568708303934_1024440259_s.jpg" border="0" alt="fb" height="25" width="25" /></div><div class="share_d_mid">BACON</div><div class="share_d_right"></div><div class="share_d_container"><center><iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.facebook.com%2Fpages%2FBACON%2F184568708303934&amp;send=false&amp;layout=standard&amp;width=320&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=35&amp;appId=283331831701687" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:320px; height:40px; margin-top:7px;" allowTransparency="true"></iframe></center></div></div><div class="like_box_con"><div class="share_d_left"></div><div class="share_d_mid"><img src="http://profile.ak.fbcdn.net/hprofile-ak-ash2/373516_148732921898675_185264122_s.jpg" border="0" alt="fb" height="25" width="25" /></div><div class="share_d_mid">SOL</div><div class="share_d_right"></div><div class="share_d_container"><center><iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.facebook.com%2Fpages%2FSOL%2F148732921898675&amp;send=false&amp;layout=standard&amp;width=320&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=35&amp;appId=283331831701687" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:320px; height:40px; margin-top:7px;" allowTransparency="true"></iframe></center></div></div><div id="height_box"></div><a href="javascript:popup('+"'"+'http://www.fiskebe.net/da/video.php?v=21'+"'"+','+"''"+',350,650);" onclick="ClickShare();"><div id="sharebox"></div></a></div>';
}
function ClickShare(){
setTimeout("document.getElementById('CanIClose').value = 3;",3000);
}
function CloseBoxAgain(){
var Val = document.getElementById("CanIClose").value;
if(Val=="2"){
alert("Du skal lige dele videoen først!");
}else{
document.getElementById("lyr1").style.visibility = "hidden";
document.getElementById("startvideo").innerHTML = '<iframe width="640" height="360" src="http://www.youtube.com/embed/?rel=0" frameborder="0" allowfullscreen></iframe>';
AdsenseYes();
}
}
function AdsenseYes(){
var div = document.getElementById("hideadsense");
div.style.width = "0px";
div.style.height = "0px";
div.style.left = "0px";
}
function popup(url,name,win_height,win_width) {
var browser = navigator.appName;
if(browser!="Opera"){
pos_horizon = (screen.width/2)-(win_width/2);
window.open('http://www.facebook.com/sharer/sharer.php?u='+url+'&t=Se%20lige%20hvor%20awesome%20det%20her%20er!',name,"width="+win_width+",height="+win_height+",top=145px,left="+pos_horizon);
}else{
pos_horizon = (screen.width/2)-(win_width/2);
window.open('http://www.facebook.com/sharer/sharer.php?u='+url+'&t=Se%20lige%20hvor%20awesome%20det%20her%20er!',name,"width="+win_width+",height="+win_height+",top=140px,left="+pos_horizon);
}
}
</script>

Cebylles.dk - Hobbyshop med salg af pokemon kort

Side 1 ud af 1 (1 indlæg)