Hey, I know there have been a gazillion questions on popups already, and I spent the last hour searching but I couldn’t find anything that really helped me ?
I had a wonderful popup script that worked pretty nice in Mozilla, but when I tried it in IE it was a catastrophe.
After searching a bit here I found the following code and tried it with that. It works ok, but there are a few issues:
–
My images are larger than the screen sometimes, so I need the popup to have scroll bars. [I]and yes, I found a thread about adding scrollbars to popups, but I couldn’t get any help from it.
there’s a white frame around each image, how can I get rid of that?
[CODE]<!– Begin
function picWindow(piclink)
{
pic = new Image();
pic.src = (piclink);
picWindow_getSize(piclink,1);
}
function picWindow_getSize(piclink,attempt)
{
if (attempt == 20)
{
picWindow_Open(piclink,580,580);
}
else if (pic.width != 0)
{
picWindow_Open(piclink,pic.width,pic.height);
}
else
{
attempt += 1;
timeoutfunction = ‘picWindow_GetSize(“‘ + piclink + ‘”,’ + attempt + ‘)’
setTimeout(timeoutfunction,50);
}
}
function picWindow_Open(piclink,width,height,features)
{
width = width + 20;
height = height + 20;
win = window.open(piclink,”,’width=’ + width + ‘,height=’ + height + ‘,left=275’ + ‘,top=50’);
}
// End –>
I am a complete newbie to Javascript, sorry if this is kind of a simple thing.
Also, if someone has a complete different solution that works in as many browsers as possible, is auto-resizing, has scrollbars and no white frame, please please please post it. ?
Thanks!