# Chromeless popup windows for jpg or gifs

**URL:** <https://forum.kirupa.com/t/chromeless-popup-windows-for-jpg-or-gifs/382>\
**Category:** Uncategorized\
**Created:** [July 16, 2002, 2:54am UTC](https://forum.kirupa.com/t/chromeless-popup-windows-for-jpg-or-gifs/382 "2002-07-16T02:54:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![eudora](https://avatars.discourse-cdn.com/v4/letter/e/f14d63/32.png) [@eudora](https://forum.kirupa.com/u/eudora)\
**Post date:** [July 16, 2002, 2:54am UTC](https://forum.kirupa.com/t/chromeless-popup-windows-for-jpg-or-gifs/382/1 "2002-07-16T02:54:21Z")

</div>

u know when u do a popup of a jpeg… there is those ugly white spaces behind that jpg… is there anyway to avoid this?  
and can it auto detect the image size for popup?

a found this javascript… but seems to have a problem to make it work with the chromeless windows i used in kirupa…

function image\_open(image\_loc,img)  
{  
HTML = “\<html\>\<style\>body{margin:0px 0px 0px 0px}\</style\>\<body onBlur=‘top.close()’\>\<img src=’”+ image\_loc +"’ border=0 name=load\_image onLoad=‘window.resizeTo(document.load\_image.width+10,document.load\_image.height+30)’\>\</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);

}  
is there anything wrong with this script?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 16, 2002, 4:20am UTC](https://forum.kirupa.com/t/chromeless-popup-windows-for-jpg-or-gifs/382/2 "2002-07-16T04:20:17Z")

</div>

actually i got a few problems 2 infact…

i used the chromeless windows to pop up…

[http://grotesk.feu-noir.com](http://grotesk.feu-noir.com)

after which if u go to the graphics and click on the pic…  
the pic dont seem to pop up right…  
i tried the same script for that popup and it is working fine…

the other problem is with the link section…  
the menu box shld open the link in a new window but instead it opens full screen…  
i tried the same script on another page without the chromeless windows… and it is working fine…

☹

okok the scripts…

for the graphics popup…  
\<script language = javascript\>  
function image\_open(image\_loc,img)  
{  
HTML = “\<html\>\<style\>body{margin:0px 0px 0px 0px}\</style\>\<body onBlur=‘top.close()’\>\<img src=’”+ image\_loc +"’ border=0 name=load\_image onLoad=‘window.resizeTo(document.load\_image.width+10,document.load\_image.height+30)’\>\</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;  
}  
\</script\>

it comes from [http://www.scriptbreaker.com/](http://www.scriptbreaker.com/)

as for the links:  
\<script language=“javascript”\>  
function jump(form) {  
var myindex=form.menu.selectedIndex  
if (form.menu.options[myindex].value != “0”)  
{  
window.open(form.menu.options[myindex].value,  
target="\_blank");  
}  
}  
//–\>  
\</script\>  
that comes from lissa explains
