최근 갤러리 게시판에서 새창을 가운데로 정보
최근 갤러리 게시판에서 새창을 가운데로본문
최근갤러리 스킨을 사용하고 있습니다.
스킨에서 갤러리 이미지를 클릭하면 새창이 뜨는데 이것을 화면 해상도와 상관없이
화면 가운데로 뜨게 하고 싶습니다.
<script language="javascript">
function popupImage(imageURL){
imageHandle=open("","popupForImage","toolbar=no,location=no,status=no,manubar=no,scrollbars=no,resizable=no,width=100,height=100,top=0,left=0");
imageHandle.document.write("<title> </title>");
imageHandle.document.write("<style>");
imageHandle.document.write("*{margin:0;padding:0;border:0;}");
imageHandle.document.write("</style>");
imageHandle.document.write("<img src=\""+imageURL+"\" onload=\"window.resizeTo(this.width+6,this.height+55);\" onclick=\"self.close();\" style=\"cursor:hand;\" title=\"클릭하면 닫힙니다.\">");
}
</script>
function popupImage(imageURL){
imageHandle=open("","popupForImage","toolbar=no,location=no,status=no,manubar=no,scrollbars=no,resizable=no,width=100,height=100,top=0,left=0");
imageHandle.document.write("<title> </title>");
imageHandle.document.write("<style>");
imageHandle.document.write("*{margin:0;padding:0;border:0;}");
imageHandle.document.write("</style>");
imageHandle.document.write("<img src=\""+imageURL+"\" onload=\"window.resizeTo(this.width+6,this.height+55);\" onclick=\"self.close();\" style=\"cursor:hand;\" title=\"클릭하면 닫힙니다.\">");
}
</script>
수정할 수 있는 부분좀 수정해 주세요..ㅠ
댓글 전체
width=100,height=100,top=0,left=0
부분에서 left=0 숫자를 50 으로 ..숫자를 늘려보세요...그러면 중앙으로 오게됩니다.
부분에서 left=0 숫자를 50 으로 ..숫자를 늘려보세요...그러면 중앙으로 오게됩니다.
장난하십니까..? -_-
테일즈님 안녕하세요 ^^
<script language="javascript">
function popupImage(imageURL){
var l = (screen.width-100)/2;//아래 width='' 값을 동일하게 지정해주세요
var t = (screen.height-100)/2;//height=''값을 동일하게 지정해주세요
imageHandle=open("","popupForImage","left="+l+", top="+t+",width=100,height=100,toolbar=no,location=no,status=no,manubar=no,scrollbars=no,resizable=no");
imageHandle.document.write("<title> </title>");
imageHandle.document.write("<style>");
imageHandle.document.write("*{margin:0;padding:0;border:0;}");
imageHandle.document.write("</style>");
imageHandle.document.write("<img src=\""+imageURL+"\" onload=\"window.resizeTo(this.width+6,this.height+55);\" onclick=\"self.close();\" style=\"cursor:hand;\" title=\"클릭하면 닫힙니다.\">");
}
</script>
<body onload='javascript:popupImage();'>
이소스가 혹시 도움이 될지 모르겠네요
팝업띄울창 가로세로 값을
var l = (screen.width-100)/2;//아래 width='' 값을 동일하게 지정해주세요
var t = (screen.height-100)/2;//height=''값을 동일하게 지정해주세요
100이라는 곳에 팝업창 가로세로 값과 동일하게 넣어주면 항상 정중앙에 오게 됩니다.
찾고계신게 맞는지는 모르겠습니다만 혹시 다른걸 찾으신다면
웹상에 찾아보면 비슷한 스크립트가 많을겁니다 ^^
지난주 바뻐서 자세히 도움못드렸는데
갤러리스킨 수정하셔서 잘되신다고 하시니 다행입니다 ㅎㅎ
오픈은 잘하셨는지요?하셨는지 모르지만 암튼 축하드립니다!^^
새로운한주 잘 보내시기 바랍니다 ^^
<script language="javascript">
function popupImage(imageURL){
var l = (screen.width-100)/2;//아래 width='' 값을 동일하게 지정해주세요
var t = (screen.height-100)/2;//height=''값을 동일하게 지정해주세요
imageHandle=open("","popupForImage","left="+l+", top="+t+",width=100,height=100,toolbar=no,location=no,status=no,manubar=no,scrollbars=no,resizable=no");
imageHandle.document.write("<title> </title>");
imageHandle.document.write("<style>");
imageHandle.document.write("*{margin:0;padding:0;border:0;}");
imageHandle.document.write("</style>");
imageHandle.document.write("<img src=\""+imageURL+"\" onload=\"window.resizeTo(this.width+6,this.height+55);\" onclick=\"self.close();\" style=\"cursor:hand;\" title=\"클릭하면 닫힙니다.\">");
}
</script>
<body onload='javascript:popupImage();'>
이소스가 혹시 도움이 될지 모르겠네요
팝업띄울창 가로세로 값을
var l = (screen.width-100)/2;//아래 width='' 값을 동일하게 지정해주세요
var t = (screen.height-100)/2;//height=''값을 동일하게 지정해주세요
100이라는 곳에 팝업창 가로세로 값과 동일하게 넣어주면 항상 정중앙에 오게 됩니다.
찾고계신게 맞는지는 모르겠습니다만 혹시 다른걸 찾으신다면
웹상에 찾아보면 비슷한 스크립트가 많을겁니다 ^^
지난주 바뻐서 자세히 도움못드렸는데
갤러리스킨 수정하셔서 잘되신다고 하시니 다행입니다 ㅎㅎ
오픈은 잘하셨는지요?하셨는지 모르지만 암튼 축하드립니다!^^
새로운한주 잘 보내시기 바랍니다 ^^
항상 시원한 답변을 주시는 시로네님 감사합니다. 덕분에 잘 해결되었어요~~