묻고답하기
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
zoombox + choromeless...어떻게 해결해야 할까요?ㅜㅜ
2003.06.02 02:01
우선 소스 부터 뿌립니다..
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled</title>
</head>
<script language="JavaScript1.2">
<!--
var maxW,maxH,fromX,fromY,toX,toY,adjX,adjY,zBox,zStep=0,zLink,zNew;
function zoomBox(evt,zlink,maxw,maxh,tox,toy) {
if (arguments.length > 2) zNew=1;
scrollH=(window.pageYOffset!=null)?window.pageYOffset:document.body.scrollTop;
maxW=maxw?maxw:window.innerWidth?innerWidth:document.body.clientWidth;
maxH=maxh?maxh:window.innerHeight?innerHeight:document.body.clientHeight;
toX=tox?tox:0;
toY=(toy?toy:0)+scrollH;
fromX=evt.pageX?evt.pageX:evt.clientX;
fromY=(evt.pageY?evt.pageY:evt.clientY)+(document.all?scrollH:0);
adjX=toX+evt.screenX-fromX;
adjY=toY+evt.screenY-fromY;
if (document.createElement && document.body.appendChild && !zBox) {
zBox=document.createElement("div");
zBox.style.position="absolute";
document.body.appendChild(zBox);
} else if (document.all && !zBox) {
document.all[document.all.length-1].outerHTML+='<div id="zBoxDiv" style="position:absolute"></div>';
zBox=document.all.zBoxDiv;
} else if (document.layers && !zBox) {
zBox=new Layer(maxW);
zBox.style=zBox;
}
zLink=zlink;
doZoom();
}
function doZoom() {
zStep+=1;
zPct=(10-zStep)/10
if (document.layers) {
zBox.moveTo(toX+zPct*(fromX-toX),toY+zPct*(fromY-toY));
zBox.document.open();
zBox.document.write("<table width='"+maxW*(1-zPct)+"' height="+maxH*(1-zPct)+" border=2 cellspacing=0><tr><td></td></tr></table>");
zBox.document.close();
} else {
zBox.style.border="1px solid #000000"; // zoom 두께 및 색상
zBox.style.left=toX+zPct*(fromX-toX);
zBox.style.top=toY+zPct*(fromY-toY);
zBox.style.width=maxW*(1-zPct);
zBox.style.height=maxH*(1-zPct);
}
zBox.style.visibility="visible";
if (zStep < 10) setTimeout("doZoom("+fromX+","+fromY+","+toX+","+toY+")",30);
else {
zBox.style.visibility='hidden';
zStep=0;
if (zLink && !zNew) location.href=zLink.href;
else if (zLink && zNew) {
var w=window.open(zLink.href,'','width='+maxW+',height='+maxH+',left='+adjX+',top='+adjY+',scrollbars,resizable');
zNew=null;
}
}
}
//-->
</script>
<script language="JavaScript1.2">
<!--
function gotClick(arg) {
evt=arg?arg:event;
evtFrom=evt.target?evt.target:evt.srcElement;
if (evtFrom.parentNode) evtFrom=evtFrom.parentNode.href?evtFrom.parentNode:evtFrom;
if (evtFrom.href && !evtFrom.onclick) {
zoomBox(evt,evtFrom);
return false;
} else {
if (document.routeEvent) document.routeEvent(evt);
if (evtFrom.href) return false;
}
}
function getClicks() {
if (document.layers) document.captureEvents(Event.CLICK);
document.onclick=gotClick;
}
window.onload=getClicks;
//-->
</script>
<body>
<a href="http://suldo.zotta.net" onclick="zoomBox(event,this);return false">suldo</a>
<br>
<a href="http://www.daum.net" onclick="zoomBox(event,this,400,400,150,150);return false" >daum</a>
</body>
</html>
이게 줌박스 소스입니다. 요 줌박스 소스랑...크롬리스랑..섞어서 쓰려는데..어케 수정해야할 지 모르겠군요.
딴거는 다 제외시켜두구라도 href="zoomBox..." 이런식으로만 되도 어떻게 해보겠는데..
물론....onclick="zoomBox(event,this);return false" 에서 retrun false도 빼고요..
플래쉬에서 크롬리스를 하는 건 됐는데...요거까지 하려니...영 안되네요.
zoombox를 먼저 호출하고, 크롬리스가 되게 되면 되겠죠..
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled</title>
</head>
<script language="JavaScript1.2">
<!--
var maxW,maxH,fromX,fromY,toX,toY,adjX,adjY,zBox,zStep=0,zLink,zNew;
function zoomBox(evt,zlink,maxw,maxh,tox,toy) {
if (arguments.length > 2) zNew=1;
scrollH=(window.pageYOffset!=null)?window.pageYOffset:document.body.scrollTop;
maxW=maxw?maxw:window.innerWidth?innerWidth:document.body.clientWidth;
maxH=maxh?maxh:window.innerHeight?innerHeight:document.body.clientHeight;
toX=tox?tox:0;
toY=(toy?toy:0)+scrollH;
fromX=evt.pageX?evt.pageX:evt.clientX;
fromY=(evt.pageY?evt.pageY:evt.clientY)+(document.all?scrollH:0);
adjX=toX+evt.screenX-fromX;
adjY=toY+evt.screenY-fromY;
if (document.createElement && document.body.appendChild && !zBox) {
zBox=document.createElement("div");
zBox.style.position="absolute";
document.body.appendChild(zBox);
} else if (document.all && !zBox) {
document.all[document.all.length-1].outerHTML+='<div id="zBoxDiv" style="position:absolute"></div>';
zBox=document.all.zBoxDiv;
} else if (document.layers && !zBox) {
zBox=new Layer(maxW);
zBox.style=zBox;
}
zLink=zlink;
doZoom();
}
function doZoom() {
zStep+=1;
zPct=(10-zStep)/10
if (document.layers) {
zBox.moveTo(toX+zPct*(fromX-toX),toY+zPct*(fromY-toY));
zBox.document.open();
zBox.document.write("<table width='"+maxW*(1-zPct)+"' height="+maxH*(1-zPct)+" border=2 cellspacing=0><tr><td></td></tr></table>");
zBox.document.close();
} else {
zBox.style.border="1px solid #000000"; // zoom 두께 및 색상
zBox.style.left=toX+zPct*(fromX-toX);
zBox.style.top=toY+zPct*(fromY-toY);
zBox.style.width=maxW*(1-zPct);
zBox.style.height=maxH*(1-zPct);
}
zBox.style.visibility="visible";
if (zStep < 10) setTimeout("doZoom("+fromX+","+fromY+","+toX+","+toY+")",30);
else {
zBox.style.visibility='hidden';
zStep=0;
if (zLink && !zNew) location.href=zLink.href;
else if (zLink && zNew) {
var w=window.open(zLink.href,'','width='+maxW+',height='+maxH+',left='+adjX+',top='+adjY+',scrollbars,resizable');
zNew=null;
}
}
}
//-->
</script>
<script language="JavaScript1.2">
<!--
function gotClick(arg) {
evt=arg?arg:event;
evtFrom=evt.target?evt.target:evt.srcElement;
if (evtFrom.parentNode) evtFrom=evtFrom.parentNode.href?evtFrom.parentNode:evtFrom;
if (evtFrom.href && !evtFrom.onclick) {
zoomBox(evt,evtFrom);
return false;
} else {
if (document.routeEvent) document.routeEvent(evt);
if (evtFrom.href) return false;
}
}
function getClicks() {
if (document.layers) document.captureEvents(Event.CLICK);
document.onclick=gotClick;
}
window.onload=getClicks;
//-->
</script>
<body>
<a href="http://suldo.zotta.net" onclick="zoomBox(event,this);return false">suldo</a>
<br>
<a href="http://www.daum.net" onclick="zoomBox(event,this,400,400,150,150);return false" >daum</a>
</body>
</html>
이게 줌박스 소스입니다. 요 줌박스 소스랑...크롬리스랑..섞어서 쓰려는데..어케 수정해야할 지 모르겠군요.
딴거는 다 제외시켜두구라도 href="zoomBox..." 이런식으로만 되도 어떻게 해보겠는데..
물론....onclick="zoomBox(event,this);return false" 에서 retrun false도 빼고요..
플래쉬에서 크롬리스를 하는 건 됐는데...요거까지 하려니...영 안되네요.
zoombox를 먼저 호출하고, 크롬리스가 되게 되면 되겠죠..
댓글 5
-
-호야-
2003.06.02 20:47
크롬리스와 줌박스 둘다 suldo.net에서 들구 왔네요.. -
RedEye(kaist)
2003.06.02 11:19
소스의 출처들은? -
-호야-
2003.06.03 18:15
redEye님 ..감사드립니다.근데 제가 원한 답은 그게 아니네요...ㅜㅜ..전 a href=로 해서 호출하는 방법을 여쭤본건데..ㅜㅜ. -
RedEye(kaist)
2003.06.03 16:53
<a onClick="Chromeless=openIT('크롤리즈창 문서',350,300,null,null,'chromeless');zoomBox(event,this);return false">열기</a> -
RedEye(kaist)
2003.06.03 20:47
글쎄요,, ^^;;
앵커로만으로 어떤 이벤트를 준다는게 쉽지만은 않을텐데요,,
크롬리즈는 강제로 전체풀스크린을 줄여들이는거라,,,
그런게 가능할지,,모르겠군요 ^^;;