/ Forside/ Teknologi / Udvikling / Java Scripts / Spørgsmål
Login
Glemt dit kodeord?
Brugernavn

Kodeord


Reklame
Top 10 brugere
Java Scripts
#NavnPoint
molokyle 5410
Klaudi 2799
smorch 2439
kim 1360
Harlekin 1134
bentjuul 984
gibson 800
severino 695
Random 675
10  konsulent.. 626
pop up
Fra : grise_bassen
Vist : 460 gange
80 point
Dato : 27-12-03 11:27

hej hvordan laver man et pop up vindue som åbner ved hjælp af et tekst link
vinduet skal kun indeholde tekst

 
 
Kommentar
Fra : Lasse_Madsen


Dato : 27-12-03 11:33

Jeg vil tro, at det skal kunne laves sådan her:

Kode
<a href="nyt.htm" target="_blank"></a>


Hvor nyt.htm så skiftes ud med det, der skal åbnes og hvor du skrives teksten, der skal lede hen til filen imellem de slutningen af den første og starten af den anden...

Kommentar
Fra : grise_bassen


Dato : 27-12-03 11:55

jeg har fundet en pop up som jeg vil bruge men kan ikke få den til at gøre som jeg vil have den til

http://dynamicdrive.com/dynamicindex11/abox2.htm

pop up skal KUN åbne når man trykker på tekst linket og det skal kun være example 1

Kommentar
Fra : smorch


Dato : 27-12-03 12:34

<script language="JavaScript" type="text/JavaScript">
var domaincheck=window.location.toString()
if (domaincheck.indexOf("dynamicdrive.com")==-1&&domaincheck.indexOf("dynamicindex11")==-1){
alert("You are NOT allowed to link directly to this .js file on Dynamic Drive!")
window.location="http://www.dynamicdrive.com"
}

// Popup Windows - V 3.1
// Author: Brian Gosselin w/ changes by Dynamicdrive.com
// Site URL: http://scriptasylum.com
// Script featured on Dynamic Drive (http://www.dynamicdrive.com)
// Added option to pop up ONCE per browser session by Dynamic Drive
//
// Browser compatibility:
// IE4+, NS4+, NS6+ (with limited functionality in pre 5.0 browsers)

var w3c=(document.getElementById)? true: false;
var ie5=(w3c && document.all)? true : false;
var ns6=(w3c && (navigator.appName=="Netscape"))? true: false;
currIDb=null; xoff=0; yoff=0;
currRS=null; rsxoff=0; rsyoff=0;
oldac=null; newac=null; zdx=1; mx=0; my=0;

var idlist=new Array();
idlist.btns=new Array();
idlist.btns[0]=new Image(); idlist.btns[0].src="min.gif";
idlist.btns[1]=new Image(); idlist.btns[1].src="max.gif";
idlist.btns[2]=new Image(); idlist.btns[2].src="close.gif";
idlist.btns[3]=new Image(); idlist.btns[3].src="resize.gif";

function truebody(){ //Dynamic Drive added function
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function hidebox(id){
if(w3c){
document.getElementById(id+'_b').style.display='none';
document.getElementById(id+'_s').style.display='none';
}}

function showbox(id){
if(w3c){
var bx=document.getElementById(id+'_b').style;
var sh=document.getElementById(id+'_s').style;
bx.display='block';
sh.display='block';
sh.zIndex=++zdx;
bx.zIndex=++zdx;
}}

function minimize(){
if(w3c){
this.IDS[0].style.height=(ie5)? '28px':'24px';
this.IDS[3].style.height='28px';
this.IDS[2].style.display='none';
this.IDS[4].style.display='none';
setTimeout('ns6bugfix()',100);
}}

function restore(){
if(w3c){
var h=this.IDS[10];
this.IDS[0].style.height=h+'px'; //box
this.IDS[3].style.height=(ie5)? h+'px':h+5+'px'; //shd
this.IDS[2].style.display='block';
this.IDS[4].style.display='block';
setTimeout('ns6bugfix()',100);
}}

function ns6bugfix(){
self.resizeBy(0,1);
self.resizeBy(0,-1);
}

function trackmouse(evt){
mx=(ie5)?event.clientX+truebody().scrollLeft:evt.pageX;
my=(ie5)?event.clientY+truebody().scrollTop:evt.pageY;
if(!ns6)movepopup();
if((currIDb!=null)||(currRS!=null))return false;
}

function movepopup(){
if((currIDb!=null)&&w3c){
var x=mx+xoff;
var y=my+yoff;
currIDb.style.left=x+'px';
currIDs.style.left=x+8+'px';
currIDb.style.top=y+'px';
currIDs.style.top=y+8+'px';
}
if((currRS!=null)&&w3c){
var rx=mx+rsxoff;
var ry=my+rsyoff;
var c=currRS;
c.style.left=Math.max(rx,((ie5)?88:92))+'px';
c.style.top=Math.max(ry,((ie5)?68:72))+'px';
c.IDS[0].style.width=Math.max(rx+((ie5)?12:8),100)+'px';
c.IDS[0].style.height=Math.max(ry+((ie5)?12:8),80)+'px';
c.IDS[1].style.width=Math.max(rx+((ie5)?4:3),((ns6)?95:92))+'px';
c.IDS[5].style.left=parseInt(c.IDS[1].style.width)-48+'px';
c.IDS[3].style.width=Math.max(rx+12,((ie5)?100:104))+'px';
c.IDS[3].style.height=Math.max(ry+((ie5)?12:13),((ie5)?80:86))+'px';
c.IDS[2].style.width=Math.max(rx-((ie5)?-5:5),((ie5)?92:87))+'px';
c.IDS[2].style.height=Math.max(ry-((ie5)?24:28),44)+'px';
c.IDS[10]=parseInt(c.IDS[0].style.height);
}}

function startRS(evt){
var ex=(ie5)?event.clientX+truebody().scrollLeft:evt.pageX;
var ey=(ie5)?event.clientY+truebody().scrollTop:evt.pageY;
rsxoff=parseInt(this.style.left)-ex;
rsyoff=parseInt(this.style.top)-ey;
currRS=this;
if(ns6)this.IDS[2].style.overflow='hidden';
return false;
}

function stopdrag(){
currIDb=null;
ns6bugfix();
}

function grab_id(evt){
var ex=(ie5)?event.clientX+truebody().scrollLeft:evt.pageX;
var ey=(ie5)?event.clientY+truebody().scrollTop:evt.pageY;
xoff=parseInt(this.IDS[0].style.left)-ex;
yoff=parseInt(this.IDS[0].style.top)-ey;
currIDb=this.IDS[0];
currIDs=this.IDS[3];
return false;
}

function subBox(x,y,w,h,bgc,id){
var v=document.createElement('div');
v.setAttribute('id',id);
v.style.position='absolute';
v.style.left=x+'px';
v.style.top=y+'px';
v.style.width=w+'px';
v.style.height=h+'px';
v.style.backgroundColor=bgc;
v.style.visibility='visible';
v.style.padding='0px 0px 0px 0px';
return v;
}

function get_cookie(Name) {
var search = Name + "="
var returnvalue = ""
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) {
offset += search.length
end = document.cookie.indexOf(";", offset)
if (end == -1)
end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}


function popUp(x,y,w,h,cid,text,bgcolor,textcolor,fontstyleset,title,titlecolor,titletextcolor,bordercolor,scrollcolor,shadowcolor,showonstart,isdrag,isresize,oldOK,POPPERSESSION){
var proceedtopop=false
if (POPPERSESSION){
if (get_cookie(cid)==""){
proceedtopop=true
document.cookie=cid+"=yes"
}
}
else
proceedtopop=true

if (proceedtopop){
if(w3c){
var tw, th;
w=Math.max(w,100);
h=Math.max(h,80);
var rdiv=new subBox(w-((ie5)?12:8),h-((ie5)?12:8),7,7,'',cid+'_rs');
if(isresize){
rdiv.innerHTML='<img src="resize.gif" width="7" height="7">';
rdiv.style.cursor='move';
}
tw=(ie5)?w:w+4;
th=(ie5)?h:h+6;
var shadow=new subBox(x+8,y+8,tw,th,shadowcolor,cid+'_s');
if(ie5)shadow.style.filter="alpha(opacity=50)";
else shadow.style.MozOpacity=.5;
shadow.style.zIndex=++zdx;
var tw,th;
var outerdiv=new subBox(x,y,w,h,bordercolor,cid+'_b');
outerdiv.style.borderStyle="outset";
outerdiv.style.borderWidth="2px";
outerdiv.style.borderColor=bordercolor;
outerdiv.style.zIndex=++zdx;
tw=(ie5)?w-8:w-5;
th=(ie5)?h+4:h-4;
var titlebar=new subBox(2,2,tw,20,titlecolor,cid+'_t');
titlebar.style.overflow="hidden";
titlebar.style.cursor="default";
titlebar.innerHTML='<span style="position:absolute; left:3px; top:1px; font:bold 10pt sans-serif; color:'+titletextcolor+'; height:18px; overflow:hidden; clip-height:16px;">'+title+'</span><span id="'+cid+'_btt" style="position:absolute; width:48px; height:16px; left:'+(tw-48)+'px; top:2px;"><img src="min.gif" width="16" height="16" id="'+cid+'_min"><img src="max.gif" width="16" height="16" id="'+cid+'_max"><img src="close.gif" width="16" height="16" id="'+cid+'_cls"></span>';
tw=(ie5)?w-7:w-13;
th=(ie5)?h-36:h-36;
var content=new subBox(2,24,tw,th,bgcolor,cid+'_c');
content.style.borderColor=bordercolor;
content.style.borderStyle="inset";
content.style.borderWidth="2px";
content.style.overflow="auto";
content.style.padding="0px 2px 0px 4px";
content.style.font=fontstyleset;
content.style.color=textcolor;
if(ie5)content.style.scrollbarBaseColor=scrollcolor;
content.innerHTML=text;
outerdiv.appendChild(titlebar);
outerdiv.appendChild(content);
outerdiv.appendChild(rdiv);
document.body.appendChild(shadow);
document.body.appendChild(outerdiv);
if(!showonstart)hidebox(cid);
var IDS=new Array();
IDS[0]=document.getElementById(cid+'_b');
IDS[1]=document.getElementById(cid+'_t');
IDS[2]=document.getElementById(cid+'_c');
IDS[3]=document.getElementById(cid+'_s');
IDS[4]=document.getElementById(cid+'_rs');
IDS[5]=document.getElementById(cid+'_btt');
IDS[6]=document.getElementById(cid+'_min');
IDS[7]=document.getElementById(cid+'_max');
IDS[8]=document.getElementById(cid+'_cls');
IDS[9]=cid;
IDS[10]=h;
this.IDb=IDS[0]; this.IDb.IDS=IDS;
this.IDt=IDS[1]; this.IDt.IDS=IDS;
this.IDc=IDS[2]; this.IDc.IDS=IDS;
this.IDs=IDS[3]; this.IDs.IDS=IDS;
this.IDrs=IDS[4]; this.IDrs.IDS=IDS;
this.IDbtt=IDS[5]; this.IDbtt.IDS=IDS;
this.IDmin=IDS[6]; this.IDmin.IDS=IDS;
this.IDmax=IDS[7]; this.IDmax.IDS=IDS;
this.IDcls=IDS[8]; this.IDcls.IDS=IDS;
this.IDb.activecolor=titlecolor;
this.IDb.inactivecolor=scrollcolor;
if(oldac!=null)oldac.IDS[1].style.backgroundColor=oldac.inactivecolor;
oldac=this.IDb;
this.IDcls.onclick=new Function("hidebox('"+cid+"');");
if(isresize){
this.IDmin.onclick=minimize;
this.IDmax.onclick=restore;
this.IDrs.onmousedown=startRS;
this.IDrs.onmouseup=new Function("currRS=null");
}
this.IDb.onmousedown=function(){
if(oldac!=null){
oldac.IDS[1].style.backgroundColor=oldac.inactivecolor;
}
if(ns6)this.IDS[2].style.overflow='auto';
oldac=this;
this.IDS[1].style.backgroundColor=this.activecolor;
this.IDS[3].style.zIndex=++zdx;
this.style.zIndex=++zdx;
}
if(isdrag){
this.IDt.onmousedown=grab_id;
this.IDt.onmouseup=stopdrag;
}
}else{
if(oldOK){
var ctr=new Date();
ctr=ctr.getTime();
var win=window.open("" , "abc"+ctr , "status=no,menubar=no,width="+w+",height="+h+",resizable=yes,scrollbars=yes");
var t='<html><head><title>'+title+'</title></head><body bgcolor="'+bgcolor+'"><font style="font:'+fontstyleset+'; color:'+textcolor+'">'+text+'</font></body></html>';
win.document.write(t);
win.document.close();
}}}}

if(ns6)setInterval('movepopup()',40);

if(w3c){
document.onmousemove=trackmouse;
document.onmouseup=new Function("currRS=null");
}

</script>



<span style="cursor:hand" onclick=new popUp(200, 100, 300, 175, "Div", "Tekst her", "white", "black", "bold 10pt sans-serif", "Title Bar", "navy", "white", "#dddddd", "gray", "black", true, true, true, true, false);>Klik hér</span>

Kommentar
Fra : smorch


Dato : 27-12-03 12:34

fjern lige :

var domaincheck=window.location.toString()
if (domaincheck.indexOf("dynamicdrive.com")==-1&&domaincheck.indexOf("dynamic index11")==-1){
alert("You are NOT allowed to link directly to this .js file on Dynamic Drive!")
window.location="http://www.dynamicdrive.com"
}


Kommentar
Fra : molokyle


Dato : 27-12-03 15:05

Ik' for noget, men et frygteligt skodscript

Prøv selv at generere et hos : http://javascript.internet.com/generators/popup-window.html
..eller : http://javascriptkit.com/popwin/index.shtml

..eller hent dette færdige script : http://www.crays.com/jsc/jsPWinC.htm#popwin

Det letteste til dit behov vil jeg tro er Lasse_Madsens løsning :

Kode
<a href="TEXT.htm" target="_blank">LÆS</a>


</MOLOKYLE>

Kommentar
Fra : smorch


Dato : 27-12-03 16:00

>>>>Molokyle :Det var det der blev bedt om - skod eller ej - Jeg har ikke lave skidtet, så jeg er kølig.

Kommentar
Fra : grise_bassen


Dato : 27-12-03 22:45

her er den jeg bruger hvordan gør man hvis man kun vil have at den skal åbnes ved tekst linket og ikke også af sig selv

<head>
<script language="JavaScript" src="popup.js">

//Popup box II (By Brian Gosselin at http://scriptasylum.com/bgaudiodr)
//Modified slightly By Dynamic Drive
//For full source, visit http://www.dynamicdrive.com

</script>

<script language="javascript">



function pastecode(){
var d=document.f;
d.codea.value='new popUp('+d.x.value+', '+d.y.value+', '+d.w.value+', '+d.h.value+', "'+d.id.value+'", "'+d.ctxt.value+'", "'+d.cbgc.value+'", "'+d.ctc.value+'", "'+d.fss.value+'", "'+d.ttxt.value+'", "'+d.tbgc.value+'", "'+d.ttc.value+'", "'+d.bc.value+'", "'+d.sbc.value+'", "'+d.sc.value+'", '+d.sos.value+', '+d.dg.value+', '+d.rsz.value+', '+d.okold.value+', '+d.popname.value+');'
}

function openpopup(){
var d=document.f;
var s_top=document.all? document.body.scrollTop : window.pageYOffset
new popUp(parseInt(d.x.value), s_top+parseInt(d.y.value), parseInt(d.w.value), parseInt(d.h.value), d.id.value+(new Date().getTime()), d.ctxt.value, d.cbgc.value, d.ctc.value, d.fss.value, d.ttxt.value, d.tbgc.value, d.ttc.value, d.bc.value, d.sbc.value, d.sc.value, eval(d.sos.value), eval(d.dg.value), eval(d.rsz.value), eval(d.okold.value));
}

</script>
</head>


<body bgcolor="#000000">


<!--webbot bot="HTMLMarkup" startspan --><script>
window.onload=function(){
new popUp(350, 200, 370, 175, "Div", "skriv teksten her.</ol>", "white", "black", "9pt sans-serif", "vittigheder", "navy", "white", "#dddddd", "gray", "black", true, true, true, true, false);


}
</script>

<!--webbot bot="HTMLMarkup" endspan -->
<small><font><p>

<a href="javascript:showbox('Div')">Show box 2 again</a></small></font></p>





Kommentar
Fra : smorch


Dato : 27-12-03 23:58

Prøv at fjerne

--><script>
window.onload=function(){
new popUp(350, 200, 370, 175, "Div", "skriv teksten her.</ol>", "white", "black", "9pt sans-serif", "vittigheder", "navy", "white", "#dddddd", "gray", "black", true, true, true, true, false);

}
</script>


Kommentar
Fra : grise_bassen


Dato : 28-12-03 09:13

hmm det virker ikke

Kommentar
Fra : smorch


Dato : 28-12-03 10:35

Hvad får du af fejl ?

Accepteret svar
Fra : smorch

Modtaget 80 point
Dato : 28-12-03 10:37

Gem nedenstående som popup.js i samme mappe som din side.



var w3c=(document.getElementById)? true: false;
var ie5=(w3c && document.all)? true : false;
var ns6=(w3c && (navigator.appName=="Netscape"))? true: false;
currIDb=null; xoff=0; yoff=0;
currRS=null; rsxoff=0; rsyoff=0;
oldac=null; newac=null; zdx=1; mx=0; my=0;

var idlist=new Array();
idlist.btns=new Array();
idlist.btns[0]=new Image(); idlist.btns[0].src="min.gif";
idlist.btns[1]=new Image(); idlist.btns[1].src="max.gif";
idlist.btns[2]=new Image(); idlist.btns[2].src="close.gif";
idlist.btns[3]=new Image(); idlist.btns[3].src="resize.gif";

function truebody(){ //Dynamic Drive added function
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function hidebox(id){
if(w3c){
document.getElementById(id+'_b').style.display='none';
document.getElementById(id+'_s').style.display='none';
}}

function showbox(id){
if(w3c){
var bx=document.getElementById(id+'_b').style;
var sh=document.getElementById(id+'_s').style;
bx.display='block';
sh.display='block';
sh.zIndex=++zdx;
bx.zIndex=++zdx;
}}

function minimize(){
if(w3c){
this.IDS[0].style.height=(ie5)? '28px':'24px';
this.IDS[3].style.height='28px';
this.IDS[2].style.display='none';
this.IDS[4].style.display='none';
setTimeout('ns6bugfix()',100);
}}

function restore(){
if(w3c){
var h=this.IDS[10];
this.IDS[0].style.height=h+'px'; //box
this.IDS[3].style.height=(ie5)? h+'px':h+5+'px'; //shd
this.IDS[2].style.display='block';
this.IDS[4].style.display='block';
setTimeout('ns6bugfix()',100);
}}

function ns6bugfix(){
self.resizeBy(0,1);
self.resizeBy(0,-1);
}

function trackmouse(evt){
mx=(ie5)?event.clientX+truebody().scrollLeft:evt.pageX;
my=(ie5)?event.clientY+truebody().scrollTop:evt.pageY;
if(!ns6)movepopup();
if((currIDb!=null)||(currRS!=null))return false;
}

function movepopup(){
if((currIDb!=null)&&w3c){
var x=mx+xoff;
var y=my+yoff;
currIDb.style.left=x+'px';
currIDs.style.left=x+8+'px';
currIDb.style.top=y+'px';
currIDs.style.top=y+8+'px';
}
if((currRS!=null)&&w3c){
var rx=mx+rsxoff;
var ry=my+rsyoff;
var c=currRS;
c.style.left=Math.max(rx,((ie5)?88:92))+'px';
c.style.top=Math.max(ry,((ie5)?68:72))+'px';
c.IDS[0].style.width=Math.max(rx+((ie5)?12:8),100)+'px';
c.IDS[0].style.height=Math.max(ry+((ie5)?12:8),80)+'px';
c.IDS[1].style.width=Math.max(rx+((ie5)?4:3),((ns6)?95:92))+'px';
c.IDS[5].style.left=parseInt(c.IDS[1].style.width)-48+'px';
c.IDS[3].style.width=Math.max(rx+12,((ie5)?100:104))+'px';
c.IDS[3].style.height=Math.max(ry+((ie5)?12:13),((ie5)?80:86))+'px';
c.IDS[2].style.width=Math.max(rx-((ie5)?-5:5),((ie5)?92:87))+'px';
c.IDS[2].style.height=Math.max(ry-((ie5)?24:28),44)+'px';
c.IDS[10]=parseInt(c.IDS[0].style.height);
}}

function startRS(evt){
var ex=(ie5)?event.clientX+truebody().scrollLeft:evt.pageX;
var ey=(ie5)?event.clientY+truebody().scrollTop:evt.pageY;
rsxoff=parseInt(this.style.left)-ex;
rsyoff=parseInt(this.style.top)-ey;
currRS=this;
if(ns6)this.IDS[2].style.overflow='hidden';
return false;
}

function stopdrag(){
currIDb=null;
ns6bugfix();
}

function grab_id(evt){
var ex=(ie5)?event.clientX+truebody().scrollLeft:evt.pageX;
var ey=(ie5)?event.clientY+truebody().scrollTop:evt.pageY;
xoff=parseInt(this.IDS[0].style.left)-ex;
yoff=parseInt(this.IDS[0].style.top)-ey;
currIDb=this.IDS[0];
currIDs=this.IDS[3];
return false;
}

function subBox(x,y,w,h,bgc,id){
var v=document.createElement('div');
v.setAttribute('id',id);
v.style.position='absolute';
v.style.left=x+'px';
v.style.top=y+'px';
v.style.width=w+'px';
v.style.height=h+'px';
v.style.backgroundColor=bgc;
v.style.visibility='visible';
v.style.padding='0px 0px 0px 0px';
return v;
}

function get_cookie(Name) {
var search = Name + "="
var returnvalue = ""
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) {
offset += search.length
end = document.cookie.indexOf(";", offset)
if (end == -1)
end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}


function popUp(x,y,w,h,cid,text,bgcolor,textcolor,fontstyleset,title,titlecolor,titletextcolor,bordercolor,scrollcolor,shadowcolor,showonstart,isdrag,isresize,oldOK,POPPERSESSION){
var proceedtopop=false
if (POPPERSESSION){
if (get_cookie(cid)==""){
proceedtopop=true
document.cookie=cid+"=yes"
}
}
else
proceedtopop=true

if (proceedtopop){
if(w3c){
var tw, th;
w=Math.max(w,100);
h=Math.max(h,80);
var rdiv=new subBox(w-((ie5)?12:8),h-((ie5)?12:8),7,7,'',cid+'_rs');
if(isresize){
rdiv.innerHTML='<img src="resize.gif" width="7" height="7">';
rdiv.style.cursor='move';
}
tw=(ie5)?w:w+4;
th=(ie5)?h:h+6;
var shadow=new subBox(x+8,y+8,tw,th,shadowcolor,cid+'_s');
if(ie5)shadow.style.filter="alpha(opacity=50)";
else shadow.style.MozOpacity=.5;
shadow.style.zIndex=++zdx;
var tw,th;
var outerdiv=new subBox(x,y,w,h,bordercolor,cid+'_b');
outerdiv.style.borderStyle="outset";
outerdiv.style.borderWidth="2px";
outerdiv.style.borderColor=bordercolor;
outerdiv.style.zIndex=++zdx;
tw=(ie5)?w-8:w-5;
th=(ie5)?h+4:h-4;
var titlebar=new subBox(2,2,tw,20,titlecolor,cid+'_t');
titlebar.style.overflow="hidden";
titlebar.style.cursor="default";
titlebar.innerHTML='<span style="position:absolute; left:3px; top:1px; font:bold 10pt sans-serif; color:'+titletextcolor+'; height:18px; overflow:hidden; clip-height:16px;">'+title+'</span><span id="'+cid+'_btt" style="position:absolute; width:48px; height:16px; left:'+(tw-48)+'px; top:2px;"><img src="min.gif" width="16" height="16" id="'+cid+'_min"><img src="max.gif" width="16" height="16" id="'+cid+'_max"><img src="close.gif" width="16" height="16" id="'+cid+'_cls"></span>';
tw=(ie5)?w-7:w-13;
th=(ie5)?h-36:h-36;
var content=new subBox(2,24,tw,th,bgcolor,cid+'_c');
content.style.borderColor=bordercolor;
content.style.borderStyle="inset";
content.style.borderWidth="2px";
content.style.overflow="auto";
content.style.padding="0px 2px 0px 4px";
content.style.font=fontstyleset;
content.style.color=textcolor;
if(ie5)content.style.scrollbarBaseColor=scrollcolor;
content.innerHTML=text;
outerdiv.appendChild(titlebar);
outerdiv.appendChild(content);
outerdiv.appendChild(rdiv);
document.body.appendChild(shadow);
document.body.appendChild(outerdiv);
if(!showonstart)hidebox(cid);
var IDS=new Array();
IDS[0]=document.getElementById(cid+'_b');
IDS[1]=document.getElementById(cid+'_t');
IDS[2]=document.getElementById(cid+'_c');
IDS[3]=document.getElementById(cid+'_s');
IDS[4]=document.getElementById(cid+'_rs');
IDS[5]=document.getElementById(cid+'_btt');
IDS[6]=document.getElementById(cid+'_min');
IDS[7]=document.getElementById(cid+'_max');
IDS[8]=document.getElementById(cid+'_cls');
IDS[9]=cid;
IDS[10]=h;
this.IDb=IDS[0]; this.IDb.IDS=IDS;
this.IDt=IDS[1]; this.IDt.IDS=IDS;
this.IDc=IDS[2]; this.IDc.IDS=IDS;
this.IDs=IDS[3]; this.IDs.IDS=IDS;
this.IDrs=IDS[4]; this.IDrs.IDS=IDS;
this.IDbtt=IDS[5]; this.IDbtt.IDS=IDS;
this.IDmin=IDS[6]; this.IDmin.IDS=IDS;
this.IDmax=IDS[7]; this.IDmax.IDS=IDS;
this.IDcls=IDS[8]; this.IDcls.IDS=IDS;
this.IDb.activecolor=titlecolor;
this.IDb.inactivecolor=scrollcolor;
if(oldac!=null)oldac.IDS[1].style.backgroundColor=oldac.inactivecolor;
oldac=this.IDb;
this.IDcls.onclick=new Function("hidebox('"+cid+"');");
if(isresize){
this.IDmin.onclick=minimize;
this.IDmax.onclick=restore;
this.IDrs.onmousedown=startRS;
this.IDrs.onmouseup=new Function("currRS=null");
}
this.IDb.onmousedown=function(){
if(oldac!=null){
oldac.IDS[1].style.backgroundColor=oldac.inactivecolor;
}
if(ns6)this.IDS[2].style.overflow='auto';
oldac=this;
this.IDS[1].style.backgroundColor=this.activecolor;
this.IDS[3].style.zIndex=++zdx;
this.style.zIndex=++zdx;
}
if(isdrag){
this.IDt.onmousedown=grab_id;
this.IDt.onmouseup=stopdrag;
}
}else{
if(oldOK){
var ctr=new Date();
ctr=ctr.getTime();
var win=window.open("" , "abc"+ctr , "status=no,menubar=no,width="+w+",height="+h+",resizable=yes,scrollbars=yes");
var t='<html><head><title>'+title+'</title></head><body bgcolor="'+bgcolor+'"><font style="font:'+fontstyleset+'; color:'+textcolor+'">'+text+'</font></body></html>';
win.document.write(t);
win.document.close();
}}}}

if(ns6)setInterval('movepopup()',40);

if(w3c){
document.onmousemove=trackmouse;
document.onmouseup=new Function("currRS=null");
}



Godkendelse af svar
Fra : grise_bassen


Dato : 29-12-03 16:21

Tak for svaret smorch.
                        

Du har følgende muligheder
Eftersom du ikke er logget ind i systemet, kan du ikke skrive et indlæg til dette spørgsmål.

Hvis du ikke allerede er registreret, kan du gratis blive medlem, ved at trykke på "Bliv medlem" ude i menuen.
Søg
Reklame
Statistik
Spørgsmål : 177414
Tips : 31962
Nyheder : 719565
Indlæg : 6407821
Brugere : 218875

Månedens bedste
Årets bedste
Sidste års bedste