Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Javascript (http://www.velocityreviews.com/forums/f68-javascript.html)
-   -   Help with border around image (http://www.velocityreviews.com/forums/t917997-help-with-border-around-image.html)

Keith Smith 05-11-2005 03:06 AM

Help with border around image
 
When I use this code....

window.open('gallery/pic1.jpg','windowname','width=775,height=550,resiz able=yes,scrollbars=yes,top=10,left=10');

....my web page displays a picture with a white border around it. Is there a
way to get rid of the white border? I want to continue to link directly to
my image (pic1.jpg) and not to an HTML page. The reason for this is because
if I link directly to an HTML page then I seem to have problems with pop-up
blockers.

Anyone know how to get rid of the white around the pic?




RobB 05-11-2005 04:16 AM

Re: Help with border around image
 
Keith Smith wrote:
> When I use this code....
>
>

window.open('gallery/pic1.jpg','windowname','width=775,height=550,resiz able=yes,scrollbars=yes,top=10,left=10');
>
> ...my web page displays a picture with a white border around it. Is

there a
> way to get rid of the white border? I want to continue to link

directly to
> my image (pic1.jpg) and not to an HTML page. The reason for this is

because
> if I link directly to an HTML page then I seem to have problems with

pop-up
> blockers.
>
> Anyone know how to get rid of the white around the pic?


You may have problems with blockers regardless.

<a href="gallery/pic1.jpg"
target="picpop"
title="whatever"
onclick="return openpic(this,775,550)">show pic</a>
...........
...........
function openpic(link, w, h)
{
window.HTML = [
'<body style="margin:0;background:black;' ,
'cursor:pointer;" ' ,
'title="click to close" ' ,
'onload=document.title="'+link.title+'" ' ,
'onblur="top.close()" ' ,
'onclick="top.close()">' ,
'<img src="' + link.href + '" ',
'style="width:'+w+'px;height:'+h+'px;' ,
'border-width:0;"></body>'
].join('');
picpop = window.open(
'javascript:opener.HTML',
link.target,
'width='+w+',height='+h+',top=10,left=10'
);
if (picpop.focus)
picpop.focus();
return false;
}



All times are GMT. The time now is 09:13 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.