By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,492 Members | 1,289 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,492 IT Pros & Developers. It's quick & easy.

Help with border around image

P: n/a
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?

Jul 23 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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;
}

Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.