해상도에 상관없이 풀스크린으로 새창 띄우는 방법 좀 알려주세요~ 정보
그누보드 해상도에 상관없이 풀스크린으로 새창 띄우는 방법 좀 알려주세요~
본문
아래와 같은 소스로... 이미지 클릭시 풀스크린으로 뛰우려고 하거든요.
width와 height 부분에 '100%' 라고 표기했는데...
깨알만한 창이 뜨고, 풀스크린으로는 안되네요.
fullscreen 이라고 써봤는데도 안되고요.
아래 자바스크립트 소스로는 풀스크린이 불가능한건가요?
어떻게 수정해야 할지 간단히 봐주시면 진심으로 깊은 감사드리겠습니다.
<SCRIPT language="javascript">
function openPopup(url)
{
var sw = screen.availWidth;
var sh = screen.availHeight;
var width = '100%';
var height = '100%';
var posLt = (sw-width)/2+(screen.width-sw);
var posTp = (sh-height)/2 - 20;
var pop;
// if (width<sw) {width=sw}
// if (height<sh) {height=sh}
// alert(screen.width+"/"+screen.height+"\n"+sw+"/"+sh+"\n"+posLt+"/"+posTp);
pop=window.open(url,"mainPopup",'width='+width+',height='+height+',top='+posTp+',left='+posLt+',menubar=0,scrollbars=yes,resizable=0');
pop.focus();
}
function openAllmDisplay(url) {
enableControl();
var width = 1280;
var height = 1024;
url = document.URL.substring(0,document.URL.lastIndexOf("/")+1)+"/swf/main.asp";
openDisplay(width,height,url);
}
function openDisplay(width,height,url) {
if(typeof(Allm_Display)!="object") {return;}
try {
Allm_Display.OpenWeb(width, height, url)
} catch(e) {
setTimeout("openDisplay("+width+","+height+",'"+url+"')",100);
}
}
function enableControl()
{
span=document.frames["span_control"];
if(typeof(span)=="undefined") {
document.body.insertAdjacentHTML("afterBegin",'<SPAN id="span_control" style="display:none"></SPAN>');
}
span=document.frames["span_control"];
span.innerHTML='';
var text="<OBJECT id='Allm_Display' classid='CLSID:193F7872-BDA9-4117-A3A1-253C12D75D73' codebase='./AllmDisplay.cab#version=1,0,0,13' width=0 height=0 viewastext></OBJECT>";
span.innerHTML=text;
}
</SCRIPT>
width와 height 부분에 '100%' 라고 표기했는데...
깨알만한 창이 뜨고, 풀스크린으로는 안되네요.
fullscreen 이라고 써봤는데도 안되고요.
아래 자바스크립트 소스로는 풀스크린이 불가능한건가요?
어떻게 수정해야 할지 간단히 봐주시면 진심으로 깊은 감사드리겠습니다.
<SCRIPT language="javascript">
function openPopup(url)
{
var sw = screen.availWidth;
var sh = screen.availHeight;
var width = '100%';
var height = '100%';
var posLt = (sw-width)/2+(screen.width-sw);
var posTp = (sh-height)/2 - 20;
var pop;
// if (width<sw) {width=sw}
// if (height<sh) {height=sh}
// alert(screen.width+"/"+screen.height+"\n"+sw+"/"+sh+"\n"+posLt+"/"+posTp);
pop=window.open(url,"mainPopup",'width='+width+',height='+height+',top='+posTp+',left='+posLt+',menubar=0,scrollbars=yes,resizable=0');
pop.focus();
}
function openAllmDisplay(url) {
enableControl();
var width = 1280;
var height = 1024;
url = document.URL.substring(0,document.URL.lastIndexOf("/")+1)+"/swf/main.asp";
openDisplay(width,height,url);
}
function openDisplay(width,height,url) {
if(typeof(Allm_Display)!="object") {return;}
try {
Allm_Display.OpenWeb(width, height, url)
} catch(e) {
setTimeout("openDisplay("+width+","+height+",'"+url+"')",100);
}
}
function enableControl()
{
span=document.frames["span_control"];
if(typeof(span)=="undefined") {
document.body.insertAdjacentHTML("afterBegin",'<SPAN id="span_control" style="display:none"></SPAN>');
}
span=document.frames["span_control"];
span.innerHTML='';
var text="<OBJECT id='Allm_Display' classid='CLSID:193F7872-BDA9-4117-A3A1-253C12D75D73' codebase='./AllmDisplay.cab#version=1,0,0,13' width=0 height=0 viewastext></OBJECT>";
span.innerHTML=text;
}
</SCRIPT>
댓글 전체
<html>
<script language="JavaScript">
function openFullWindow(Option) {
var screenSizeWidth,screenSizeHeight;
if (self.screen) {
screenSizeWidth = screen.width ;
screenSizeHeight = screen.height;
}
documentURL = "http://sir.co.kr";
windowname = "wmname";
intWidth = screenSizeWidth;
intHeight = screenSizeHeight;
intXOffset = 0 ;
intYOffset = 0 ;
if(Option){
obwindow = window.open(documentURL,windowname, "fullscreen=yes, toolbar=no, location=no, directories=no, status=no, menubar=no,scrollbars=no,resizable=no") ;
} else {
obwindow = window.open(documentURL,windowname, " toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes,resizable=no") ;
obwindow.resizeTo(intWidth, intHeight) ;
obwindow.moveTo(intXOffset, intYOffset);
}
}
</script>
<body>
<input type=button value="풀화면" onclick="return openFullWindow(false);">
<p>
<input type=button value="깡그리" onclick="return openFullWindow(true);">
</body>
</html>
<script language="JavaScript">
function openFullWindow(Option) {
var screenSizeWidth,screenSizeHeight;
if (self.screen) {
screenSizeWidth = screen.width ;
screenSizeHeight = screen.height;
}
documentURL = "http://sir.co.kr";
windowname = "wmname";
intWidth = screenSizeWidth;
intHeight = screenSizeHeight;
intXOffset = 0 ;
intYOffset = 0 ;
if(Option){
obwindow = window.open(documentURL,windowname, "fullscreen=yes, toolbar=no, location=no, directories=no, status=no, menubar=no,scrollbars=no,resizable=no") ;
} else {
obwindow = window.open(documentURL,windowname, " toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes,resizable=no") ;
obwindow.resizeTo(intWidth, intHeight) ;
obwindow.moveTo(intXOffset, intYOffset);
}
}
</script>
<body>
<input type=button value="풀화면" onclick="return openFullWindow(false);">
<p>
<input type=button value="깡그리" onclick="return openFullWindow(true);">
</body>
</html>