Chromeless popup windows for jpg or gifs

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?

actually i got a few problems 2 infact…

i used the chromeless windows to pop up…

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…

:frowning:

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/

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