emcuemnecu
Registered
Как да направя като се отвори прозореца да е с зададени размери с текст в него ест.?
Follow along with the video below to see how to install our site as a web app on your home screen.
Бележка: This feature may not be available in some browsers.
За PopUp прозорец става дума,нали?Еми пак с CSS!emcuemnecu каза:Как да направя като се отвори прозореца да е с зададени размери с текст в него ест.?
<html>
<head>
<title>Zaglavie</title>
<script language="JavaScript">
function modify(th, modsrc) {
if (!window.focus) return false;
window.open("", modsrc, "width=500,height=300,left=200,top=100,directories=no,location=no,menubar=no,resizable=no,scrollbars=no,status=yes,toolbar=no");
th.target=modsrc;
return true;
}
</script>
</head>
<body>
<a href="nqkakwo_ime.html" onclick="modify(this, 'join')">Click me</a>
</body>
</html>
червеното е височината и широчината на попуп прозореца който ше се отвори а зеленото е името на файла който трябва да се отвори...<html>
<head>
<title>PopUp</title>
<SCRIPT TYPE="text/javascript">
</SCRIPT>
</head>
<BODY onLoad="popup('popup.html', 'ad')">
</body>
</html>
<a href="javascript:var oWin = window.open('URL АДРЕС','_blank','resizable=yes,scrollbars=yes,toolbar=yes,location=yes,status=yes,menubar=yes,width=535,Height=500,ShowOnlyContent=yes');" title="">ИМЕ НА ВРЪЗКАТА</a>
width=535,Height=500
<script language="javascript">
window.open('popup.html','','width=350,height=200')
</script>
<script>
var delay = "2"; //############# How long before window appears (seconds)
var winw = "400"; //############# How wide should your window be (pixels)
var winh = "300"; //############# How tall should the window be (pixels)
var repeat = "1"; //Do you want visitor to be able to re-open window after closing?
//############# published at: scripts.tropicalpcsolutions.com
var ie=(document.all);
var ns=(document.layers);
var ns6=(document.getElementById && !ie);
var calculate=ns? "" : "px"
function loadElement(){
if(!ns && !ie && !ns6) return;
if(ie) popup=eval('document.all.elementDiv.style');
else if(ns) popup=eval('document.layers["elementDiv"]');
else if(ns6) popup=eval('document.getElementById("elementDiv").style');
if (ie||ns6) popup.visibility="visible";
else popup.visibility ="show";
displayElement()
}
function displayElement(){
var agent=navigator.userAgent.toLowerCase();
if (ie){
documentWidth = (centerElement().offsetWidth)/2+centerElement().scrollLeft-(winw/2);
documentHeight = (centerElement().offsetHeight)/2+centerElement().scrollTop-(winh/2);
}
else if (ns){
documentWidth=window.innerWidth/2+window.pageXOffset-(winw/2);
documentHeight=window.innerHeight/2+window.pageYOffset-(winh/2);
}
else if (ns6){
documentWidth=self.innerWidth/2+window.pageXOffset-(winw/2);
documentHeight=self.innerHeight/2+window.pageYOffset-(winh/2);
}
popup.left = documentWidth+calculate;
popup.top = documentHeight+calculate;
setTimeout("displayElement()",100);
}
function centerElement(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}
function closeElement(){
if (ie||ns6) { popup.display="none"; }
else { popup.visibility ="hide"; }
if (repeat == 1) { location.replace; }
}
</script>
</head>
<body onLoad="setTimeout('loadElement()',delay*1000)">
<script>
document.write('<table cellSpacing="0" cellPadding="0" border="1" bgcolor="white" width='+winw+' height='+winh+' id="elementDiv" style="visibility:hidden; position:absolute; top:0; left:0; border-color:black">');
</script>
<tr>
<td align="left" valign="top" bgcolor="blue" width="100%" height="10px">
<font color=white size=2 face=arial><b>
Your Title Here...
</b></font>
</td>
<td width="10px" height="10px" bgcolor="red" align="right">
<font color="white" size="3" face="arial"><span onclick="closeElement()" style="cursor:hand" title="Click here to close this window"><b>X</b></span></font>
</td></tr>
<tr>
<td colspan="2">
<font color=black size=2 face=arial><b><center>
Your Content Here...
</center></b></font>
</td></tr></table>
</div>