Ok ik heb een pagina met tumbnails d'r op en als er op geclicked wordt dan komt er een popup zonder balken en randen, alleen met het plaatje. Maar nu wil ik dat wanneer ik op dat plaatje click dat het window dan vanzelf sluit! Hoe doe ik dat?
gewone <A HREF="JavaScript:window.close()></a> werkt niet! Althans niet zoals ik hem d'r in gezet heb.
Dit is de source:
gewone <A HREF="JavaScript:window.close()></a> werkt niet! Althans niet zoals ik hem d'r in gezet heb.
Dit is de source:
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
| <html>
<script language = javascript>
function image_open(image_loc,img)
{
HTML = "<html><style>body{margin:0px 0px 0px 0px}</style>
<body onBlur='top.close()'>[img]'"+[/img]
</body></html>";
popupImage = window.open('','_blank','toolbar=no,scrollbars=no');
popupImage.document.open();
popupImage.document.write(HTML);
popupImage.document.close();
obj_img = document.getElementById(img);
obj_img.src= obj_img.src;
function click(e) {
if (document.all) {
if (event.button == 2) {
window.close();
return false;
}
}
if (document.layers) {
if (e.which == 3) {
window.close();
return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
}
</script>
<body>
<a href="JavaScript:image_open('DCP_3046.JPG','img1')" border=0>
[img]"tnDCP_3046.JPG"[/img]</a>
<a href="JavaScript:image_open('DCP_3047.JPG','img2')" border=0>
[img]"tnDCP_3047.JPG"[/img]</a>
<a href="JavaScript:image_open('DCP_3048.JPG','img3')" border=0>
[img]"tnDCP_3048.JPG"[/img]</a>
<a href="JavaScript:image_open('DCP_3052.JPG','img4')" border=0>
[img]"tnDCP_3052.JPG"[/img]</a>
</body>
</html> |
[ Voor 34% gewijzigd door Yuri op 10-03-2003 13:35 ]
GoT voor Behoud der Nederlandschen Taal [GvBdNT]