Dibatalkan

DHTML popup on remote computer

I have a dhtml popup script that i use on remote computer by calling a javascript as <script src="http://www.remote.com/script.js"></script> but not on the same server ([url removed, login to view])

The problem i get is :

when the dhtml popup is loaded, the site who run the script doesn't charge his webpage completly and the webpage come blank with an window explorer error alert like "the website cannot be loaded" !

When i load the script on the same server (myserver), there was no problem !

Below the script i use.

I would like to keep the same script but if it need to change it i'am ok...

var w3c=([url removed, login to view])? true: false;

var ns4=([url removed, login to view])?true:false;

var ie5=(w3c && [url removed, login to view])? true : false;

var ns6=(w3c && ![url removed, login to view])? true: false;

var d=document;

currIDb=null; xoff=0; yoff=0;

currRS=null; rsxoff=0; rsyoff=0;

oldac=null; newac=null; zdx=1; mx=0; my=0;

function preloadBttns(){

var btns=new Array();

btns[2]=new Image(); btns[2].src="http://www.popub.com/close.gif";

btns[3]=new Image(); btns[3].src="http://www.popub.com/resize.gif";

}

preloadBttns();

//******* START OF EXPOSED FUNCTIONS. THESE CAN BE USED IN HYPERLINKS. *******

function hidebox(id){

if(w3c){

[url removed, login to view](id+'_b').style.display='none';

[url removed, login to view](id+'_s').style.display='none';

}}

function showbox(id){

if(w3c){

var bx=[url removed, login to view](id+'_b');

var sh=[url removed, login to view](id+'_s');

bx.style.display='block';

sh.style.display='block';

sh.style.zIndex=++zdx;

bx.style.zIndex=++zdx;

changez(bx);

}}

function changecontent(id,text){

if(![url removed, login to view](id+'_b').isExt){

var d=[url removed, login to view](id+'_c');

if(ns6)d.style.overflow="hidden";

d.innerHTML=text;

if(ns6)d.style.overflow="block";

}else [url removed, login to view](id+'_ifrm').src=text;

}

//******* END OF EXPOSED FUNCTIONS *******

function minimize(){

if(w3c){

[url removed, login to view]([url removed, login to view]+"_b").style.height=(ie5)? '28px':'24px';

[url removed, login to view]([url removed, login to view]+"_s").style.height='28px';

[url removed, login to view]([url removed, login to view]+"_c").style.display='none';

[url removed, login to view]([url removed, login to view]+"_rs").style.display='none';

ns6bugfix();

}}

function restore(){

if(w3c){

[url removed, login to view]([url removed, login to view]+"_b").style.height=this.h+'px';

[url removed, login to view]([url removed, login to view]+"_s").style.height=(ie5)? this.h+'px':this.h+5+'px';

[url removed, login to view]([url removed, login to view]+"_c").style.display='block';

[url removed, login to view]([url removed, login to view]+"_rs").style.display='block';

ns6bugfix();

}}

function ns6bugfix(){

if(ns6)setTimeout('[url removed, login to view](0,1); [url removed, login to view](0,-1);', 100);

}

function trackmouse(evt){

mx=(ie5)?[url removed, login to view]+[url removed, login to view]:[url removed, login to view];

my=(ie5)?[url removed, login to view]+[url removed, login to view]:[url removed, login to view];

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;

d.gEl=[url removed, login to view];

[url removed, login to view]([url removed, login to view]+"_extWA").style.display="block";

c.style.left=[url removed, login to view](rx,((ie5)?88:92))+'px';

c.style.top=[url removed, login to view](ry,((ie5)?68:72))+'px';

[url removed, login to view]([url removed, login to view]+"_b").style.width=[url removed, login to view](rx+((ie5)?12:8),100)+'px';

[url removed, login to view]([url removed, login to view]+"_b").style.height=[url removed, login to view](ry+((ie5)?12:8),80)+'px';

[url removed, login to view]([url removed, login to view]+"_t").style.width=[url removed, login to view](rx+((ie5)?4:3),((ns6)?95:92))+'px';

[url removed, login to view]([url removed, login to view]+"_btt").style.left=parseInt([url removed, login to view]([url removed, login to view]+"_t").[url removed, login to view])-48+'px';

[url removed, login to view]([url removed, login to view]+"_s").style.width=[url removed, login to view](rx+12,((ie5)?100:104))+'px';

[url removed, login to view]([url removed, login to view]+"_s").style.height=[url removed, login to view](ry+((ie5)?12:13),((ie5)?80:86))+'px';

[url removed, login to view]([url removed, login to view]+"_c").style.width=[url removed, login to view](rx-((ie5)?-5:5),((ie5)?92:87))+'px';

[url removed, login to view]([url removed, login to view]+"_c").style.height=[url removed, login to view](ry-((ie5)?24:28),44)+'px';

[url removed, login to view]([url removed, login to view]+"_max").h=parseInt([url removed, login to view]([url removed, login to view]+"_b").[url removed, login to view]);

}

return false;

}

function stopRS(){

[url removed, login to view]([url removed, login to view]+"_extWA").style.display="none";

currRS=null;

}

function startRS(evt){

var ex=(ie5)?[url removed, login to view]+[url removed, login to view]:[url removed, login to view];

var ey=(ie5)?[url removed, login to view]+[url removed, login to view]:[url removed, login to view];

rsxoff=parseInt([url removed, login to view])-ex;

rsyoff=parseInt([url removed, login to view])-ey;

currRS=this;

if(ns6)[url removed, login to view]([url removed, login to view]+"_c").style.overflow='hidden';

return false;

}

function changez(v){

var th=(v!=null)?v:this;

if(oldac!=null)[url removed, login to view]([url removed, login to view]+"_t").style.backgroundColor=[url removed, login to view];

if(ns6)[url removed, login to view]([url removed, login to view]+"_c").style.overflow='auto';

oldac=th;

[url removed, login to view]([url removed, login to view]+"_t").style.backgroundColor=[url removed, login to view];

[url removed, login to view]([url removed, login to view]+"_s").style.zIndex=++zdx;

th.style.zIndex=++zdx;

[url removed, login to view]([url removed, login to view]+"_rs").style.zIndex=++zdx;

}

function stopdrag(){

currIDb=null;

[url removed, login to view]([url removed, login to view]+"_extWA").style.display="none";

ns6bugfix();

}

function grab_id(evt){

var ex=(ie5)?[url removed, login to view]+[url removed, login to view]:[url removed, login to view];

var ey=(ie5)?[url removed, login to view]+[url removed, login to view]:[url removed, login to view];

xoff=parseInt([url removed, login to view]([url removed, login to view]+"_b").[url removed, login to view])-ex;

yoff=parseInt([url removed, login to view]([url removed, login to view]+"_b").[url removed, login to view])-ey;

currIDb=[url removed, login to view]([url removed, login to view]+"_b");

currIDs=[url removed, login to view]([url removed, login to view]+"_s");

[url removed, login to view]([url removed, login to view]+"_extWA").style.display="block";

return false;

}

function subBox(x,y,w,h,bgc,id){

var v=[url removed, login to view]('div');

[url removed, login to view]('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';

if(bgc!='')v.style.backgroundColor=bgc;

v.style.visibility='visible';

v.style.padding='0px';

return v;

}

function get_cookie(Name) {

var search=Name+"=";

var returnvalue="";

if(d.cookie.length>0){

offset=[url removed, login to view](search);

if(offset!=-1){

offset+=[url removed, login to view];

end=[url removed, login to view](";",offset);

if(end==-1)end=[url removed, login to view];

returnvalue=unescape([url removed, login to view](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,isExt,popOnce){

var okPopUp=false;

if (popOnce){

if (get_cookie(cid)==""){

okPopUp=true;

d.cookie=cid+"=yes"

}}

else okPopUp=true;

if(okPopUp){

if(w3c){

w=[url removed, login to view](w,100);

h=[url removed, login to view](h,80);

var rdiv=new subBox(w-((ie5)?12:8),h-((ie5)?12:8),7,7,'',cid+'_rs');

if(isresize){

rdiv.innerHTML='<img src="http://www.popub.com/resize.gif" width="7" height="7">';

rdiv.style.cursor='move';

}

var tw=(ie5)?w:w+4;

var 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 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";

var tmp=(isresize)?'<img src="http://www.popub.com/min.gif" id="'+cid+'_min"><img src="http://www.popub.com/max.gif" id="'+cid+'_max">':'';

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><div id="'+cid+'_btt" style="position:absolute; width:48px; height:16px; left:'+(tw-48)+'px; top:2px; text-align:right">'+tmp+'<img src="http://www.popub.com/close.gif" id="'+cid+'_cls"></div>';

tw=(ie5)?w-7:w-13;

var content=new subBox(2,24,tw,h-36,bgcolor,cid+'_c');

content.style.borderColor=bordercolor;

content.style.borderWidth="2px";

if(isExt){

content.innerHTML='<iframe id="'+cid+'_ifrm" src="'+text+'" width="100%" height="100%"></iframe>';

content.style.overflow="hidden";

}else{

if(ie5)content.style.scrollbarBaseColor=scrollcolor;

content.style.borderStyle="inset";

content.style.overflow="auto";

content.style.padding="0px 2px 0px 4px";

content.innerHTML=text;

content.style.font=fontstyleset;

content.style.color=textcolor;

}

var extWA=new subBox(2,24,0,0,'',cid+'_extWA');

extWA.style.display="none";

extWA.style.width='100%';

extWA.style.height='100%';

[url removed, login to view](titlebar);

[url removed, login to view](content);

[url removed, login to view](extWA);

[url removed, login to view](rdiv);

[url removed, login to view](shadow);

[url removed, login to view](outerdiv);

d.gEl=[url removed, login to view];

if(!showonstart)hidebox(cid);

var wB=[url removed, login to view](cid+'_b');

wB.cid=cid;

wB.isExt=(isExt)?true:false;

var wT=[url removed, login to view](cid+'_t');

wT.cid=cid;

if(isresize){

var wRS=[url removed, login to view](cid+'_rs');

wRS.cid=cid;

var wMIN=[url removed, login to view](cid+'_min');

wMIN.cid=cid;

var wMAX=[url removed, login to view](cid+'_max');

wMAX.h=h;

wMAX.cid=cid;

wMIN.onclick=minimize;

wMAX.onclick=restore;

wRS.onmousedown=startRS;

wRS.onmouseup=stopRS;

}

var wCLS=[url removed, login to view](cid+'_cls'); //8

var wEXTWA=[url removed, login to view](cid+'_extWA'); //11

wB.activecolor=titlecolor;

wB.inactivecolor=scrollcolor;

if(oldac!=null)[url removed, login to view]([url removed, login to view]+"_t").style.backgroundColor=[url removed, login to view];

oldac=wB;

wCLS.onclick=new Function("hidebox('"+cid+"');");

wB.onmousedown=function(){ changez(this) }

if(isdrag){

wT.onmousedown=grab_id;

wT.onmouseup=stopdrag;

}

}else{

if(oldOK){

var ctr=new Date();

ctr=[url removed, login to view]();

var t=(isExt)?text:'';

var posn=(ns4)? 'screenX='+x+',screenY='+y: 'left='+x+',top='+y;

var win=[url removed, login to view](t , "abc"+ctr , "status=no,menubar=no,width="+w+",height="+h+",resizable="+((isresize)?"yes":"no")+",scrollbars=yes,"+posn);

if(!isExt){

t='<html><head><title>'+title+'</title></head><body bgcolor="'+bgcolor+'"><font style="font:'+fontstyleset+'; color:'+textcolor+'">'+text+'</font></body></html>';

[url removed, login to view](t);

[url removed, login to view]();

}}}}}

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

if(w3c){

d.onmousemove=trackmouse;

d.onmouseup=new Function("currRS=null");

}

new popUp(000 , 000 , 480 , 300 , "Div1" , "<%=URL%>" , "white" , "black" , "10pt sans-serif" , "<font size=1><b><a href='[url removed, login to view]' target='_new'><font color=white>Popub.com</font></a> sponsorisation de site</b></font> - <a href=<%=URL%> rel=nofollow target=_blank><font color=#FFFFFF>Ouvrir dans une autre fenetre</font></a>" , "#0055E5" , "white" , "#003DDC", "yellow" , "#C8D8FB" , true ,true , true , true , true , false );

Kemahiran: Javascript

Lihat lebih lanjut: rsyoff, shstyledisplay error, webpage problem, substring search, substring c, self html, search substring, write content div, javascript self, html img position, height length, get substring, ey, div search, c substring, auto alert, abc color, abc 11, max auto, javascript remote popup, getelementbyid, dhtml popup shadow, pop remote computers, run pop remote computer, janela pop dhtml

Tentang Majikan:
( 3 ulasan ) Frejus, France

ID Projek: #321594

2 pekerja bebas membida secara purata $30 untuk pekerjaan ini

frankouz

Let me see the website with the error message. view pm for details

$30 USD dalam 2 hari
(5 Ulasan)
4.1
gafhus

check pm please

$30 USD dalam 0 hari
(2 Ulasan)
2.1