Ik heb dus het volgende scriptje geschreven:
Hier te vinden als voorbeeld <- kan zijn dat de server down is, in dat geval gewoon ff copy-pasten van hieronder...
Maar ik heb nu het probleem dat wanneer ik dit scherm wil verplaatsen op de een of ander manier uit het window raak, met als gevolg dat het scherm blijft staan (voor exact probleem open de link en verplaats het popup window).
Wat kan ik hieraan doen zodat het wel werkt?
Hier te vinden als voorbeeld <- kan zijn dat de server down is, in dat geval gewoon ff copy-pasten van hieronder...
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
| index.html: <script> popupWindow = window.open( "", "", "fullscreen = 1, toolbar = 0, location = 0, directories = 0, status = 0, menubar = 0, scrollbars = 0, resizable = 0, width = 320, height = 240" ); popupWindow.window.moveTo( 5000, 0 ); popupWindow.window.resizeTo( 320, 240 ); popupWindow.moveTo( window.screen.width / 2 - 160, window.screen.height / 2 - 120 ); popupContent = "<html>\n"; popupContent += " <head>\n"; popupContent += " <title>Popup</title>\n"; popupContent += " </head>\n"; popupContent += " <frameset rows = \"18, *\" border = \"0\">\n"; popupContent += " <frame name = \"top\" src = \"top.html\" scrolling = \"no\" noresize>\n"; popupContent += " <frame name = \"main\" src = \"about:<body bgcolor = '#aaaaaa'>Hier dus de content...</body>\" scrolling = \"no\" noresize>\n"; popupContent += " </frameset>\n"; popupContent += "</html>\n"; popupWindow.document.open(); popupWindow.document.write( popupContent ); popupWindow.document.close(); </script> |
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
| top.html:
<html>
<head>
<style>
body
{
background-color: #999999;
margin: 0;
}
table
{
border: 1 solid;
border-color: #444444;
}
td
{
font: bold 8pt verdana;
}
</style>
</head>
<body>
<table cellspacing = "0" width = "100%">
<tr>
<td id = "titleBar" align = "center" style = "border-right: 0;">Titel</td>
<td width = "14" style = "border-left: 0;"><img src = "close.gif" onclick = "parent.window.close()"></td>
</tr>
</table>
</body>
<script>
winStatus = "up";
titleBar.onmousedown = new Function( "winStatus = \"down\"; movePopup();" );
titleBar.onmouseup = new Function( "winStatus = \"up\"; movePopup();" );
titleBar.onselectstart = new Function("return false;");
titleBar.ondragstart = new Function("return false;");
titleBar.oncontextmenu = new Function("return false;");
titleBar.onmousemove = movePopup;
function movePopup()
{
if( winStatus == "down" )
{
ofx = event.x
ofy = event.y
winStatus = "drag"
}
else if( winStatus == "drag" )
{
px = event.screenX - ofx;
py = event.screenY - ofy;
parent.window.x = px;
parent.window.y = py;
parent.window.moveTo( px , py );
}
else
{
winStatus = "up"
}
}
</script>
</html> |
Maar ik heb nu het probleem dat wanneer ik dit scherm wil verplaatsen op de een of ander manier uit het window raak, met als gevolg dat het scherm blijft staan (voor exact probleem open de link en verplaats het popup window).
Wat kan ik hieraan doen zodat het wel werkt?
=( Protected by witchcraft )=