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

Erasing border and padding in javascript window

P: n/a
Eva
Hi,

I'm really really really new to javascripts and so i couldn't really
comprehend thoroughly on the the previous posts regarding this issue.

Anyways, I'm setting up a picture album site. When i click on a
thumbnail or a picture, a larger picture pops up in a javascript
window. But it has a space on the top and on the left of my larger pic
in the pop-up window. How do i get rid of that? Also, i want the
window to fit my my pic so there's no space whatsoever around it.

Here is what i have:

<table height="333" border="0" align="center" cellspacing="0">
<tr valign="bottom">
<td align="center"> <SCRIPT language="JavaScript">
<!--
function my_win()
{
window.open('picturealbum/MattMe%20Thumbnails/images/MattMe1_jpg.jpg','mywindow','width=306,height=257, border=0,padding=0');
}
//-->
</SCRIPT> <A HREF="javascript:my_win()"><IMG
SRC="picturealbum/MattMe%20Thumbnails/thumbnails/MattMe1_jpg.jpg"
border="0"></A></td>
<td align="center"><a
href="picturealbum/MattMe%20Thumbnails/images/MattMe10_jpg.jpg"><img
src="picturealbum/MattMe%20Thumbnails/thumbnails/MattMe10_jpg.jpg"
border="0"></a>
</td>
Jul 23 '05 #1
Share this Question
Share on Google+
19 Replies


P: n/a
On 17 Nov 2004 00:23:38 -0800, Eva wrote:
When i click on a
thumbnail or a picture, a larger picture pops up in a javascript
window. But it has a space on the top and on the left of my larger pic
in the pop-up window. How do i get rid of that?


CSS. (JS is not needed for this one)

--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.LensEscapes.com/ Images that escape the mundane
Jul 23 '05 #2

P: n/a
Thanks. But what do insert and where in my coding do i insert it?

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 23 '05 #3

P: n/a
On Wed, 17 Nov 2004 08:35:53 GMT, Andrew Thompson <Se********@www.invalid>
wrote:
On 17 Nov 2004 00:23:38 -0800, Eva wrote:
[...] it has a space on the top and on the left of my larger pic in the
pop-up window. How do i get rid of that?


CSS. (JS is not needed for this one)


I don't think that's feasible here. In the OP, the contents of the new
window is an image by itself. CSS would have no application here.

I'm not sure if there is a solution. If a browser decides to pad the
viewport when displaying an image, I doubt you can persuade it otherwise.

Mike

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
Jul 23 '05 #4

P: n/a
On 17 Nov 2004 08:45:45 GMT, Eva Lean wrote:

(no norder in image page)

(A.T.)
CSS. (JS is not needed for this one)
Thanks. But what do insert and where in my coding do i insert it?


(Please quote a little of what you are replying to, Eva, to
give it a context. Copy/paste if necessary.)

1st, the best group for advice on CSS is not one that discusses JS.

You are currently posting to
<http://groups.google.com/groups?as_ugroup=comp.lang.javascript>
...whereas those CSS answers are found on..
<http://groups.google.com/groups?as_ugroup=comp.infosystems.www.authoring.st ylesheets>

Do a search on the latter group and read some of the posts.
If that does not sort the problem, make a post.

HTH

--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.LensEscapes.com/ Images that escape the mundane
Jul 23 '05 #5

P: n/a
On Wed, 17 Nov 2004 09:20:34 GMT, Michael Winter wrote:
On Wed, 17 Nov 2004 08:35:53 GMT, Andrew Thompson <Se********@www.invalid>
wrote:
On 17 Nov 2004 00:23:38 -0800, Eva wrote:
[...] it has a space on the top and on the left of my larger pic in the
pop-up window. How do i get rid of that?


CSS. (JS is not needed for this one)


I don't think that's feasible here. In the OP, the contents of the new
window is an image by itself. CSS would have no application here.


Oops! My bad. I glanced at the original post and saw HTML
tables and stuff and jumped to the wrong conclusion that it
was the image page.

OTOH, instead of 'showing a raw image' in a window, the OP
could 'show the image page' in the new window, and give it
the image path/name as a parameter in the URL.

(Which would then bring us back to CSS as the solution)

--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.LensEscapes.com/ Images that escape the mundane
Jul 23 '05 #6

P: n/a
On Wed, 17 Nov 2004 09:53:51 GMT, Andrew Thompson <Se********@www.invalid>
wrote:

[snip]
OTOH, instead of 'showing a raw image' in a window, the OP
could 'show the image page' in the new window, and give it
the image path/name as a parameter in the URL.


You could.

You could also not use a new window, avoiding the problem entirely. :)

Mike

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
Jul 23 '05 #7

P: n/a
On Wed, 17 Nov 2004 10:01:01 GMT, Michael Winter wrote:
You could also not use a new window, avoiding the problem entirely. :)


...best suggestion that has come up in this thread so far.

It will also save the site owners money in support
'I just installed [IE SP2, Google Toolbar..] now your site is
broken! I clicked a link and nothing happened.. '

--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.LensEscapes.com/ Images that escape the mundane
Jul 23 '05 #8

P: n/a
Andrew Thompson <Se********@www.invalid> wrote in message news:<1u******************************@40tude.net> ...
On Wed, 17 Nov 2004 10:01:01 GMT, Michael Winter wrote:
You could also not use a new window, avoiding the problem entirely. :)


..best suggestion that has come up in this thread so far.

It will also save the site owners money in support
'I just installed [IE SP2, Google Toolbar..] now your site is
broken! I clicked a link and nothing happened.. '


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<title>foo</title>
<base href="http://www.maineviews.com/albums/album11/" />
<style type="text/css">

img {
display: block;
margin: 12px;
border: none;
}

</style>
<script type="text/javascript">

var picwin = null;
var filepath = 'http://www.maineviews.com/albums/album11/';
var sHTML = '';

function getHTML()
{
return sHTML;
}

function pw(src, w, h, title, BG)
{
if (null != picwin && !picwin.closed)
picwin.close();
src = (filepath || '').concat(src);
var l = (screen.availWidth - w - 10) * .5;
var t = (screen.availHeight - h) * .5;
var config = 'width=' + w + ',height=' + h + ',left=' + l + ',top=' +
t + ',status=0';
title = title || 'Picture Window'
BG = BG || '#000';
sHTML = '';
sHTML += '<html><head><title>' + title + '</title></head>' +
'<body style="margin:0;background:'+BG+';' +
' onblur="setTimeout(function(){self.focus()},200)"' +
' onclick="self.close()"><img style="border-width:0;cursor:pointer;"'
+
' title="click to close" src="' + src + '"></a></body></html>';

picwin = open('javascript:opener.getHTML()', 'picwin', config);
if (null != picwin && !picwin.closed)
picwin.focus();
return false;
}

</script>
</head>
<body>
<a href="#null" onclick="return pw('sugarshakers.sized.jpg', 640, 424,
'Sugar Shakers')">
<img src="sugarshakers.thumb.jpg" />
</a>
<a href="#null" onclick="return pw('threeviews.sized.jpg', 640, 154,
'Three Views')">
<img src="threeviews.thumb.jpg" />
</a>
<a href="#null" onclick="return pw('simplefruit_finished.sized.jpg',
640, 459, 'Simple Fruit')">
<img src="simplefruit_finished.thumb.jpg" />
</a>
</body>
</html>
Jul 23 '05 #9

P: n/a
Andrew Thompson <Se********@www.invalid> wrote in message news:<1u******************************@40tude.net> ...
On Wed, 17 Nov 2004 10:01:01 GMT, Michael Winter wrote:
You could also not use a new window, avoiding the problem entirely. :)


..best suggestion that has come up in this thread so far.

It will also save the site owners money in support
'I just installed [IE SP2, Google Toolbar..] now your site is
broken! I clicked a link and nothing happened.. '


Oops. Sorry, typo...

sHTML += '<html><head><title>' + title + '</title></head>' +
'<body style="margin:0;background:'+BG+';"' +
' onblur="setTimeout(\'self.focus()\',100)"' +
' onclick="self.close()"><img style="border-width:0;cursor:pointer;"' +
' title="click to close" src="' + src + '"></a></body></html>';
Jul 23 '05 #10

P: n/a
On 17 Nov 2004 11:11:27 -0800, RobB wrote:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

(snip)

That seems to do the trick. (Well, in IE in any case.)

Nice pics too, but is there any chance of you supplying
at least one without a border? I had to look closely
at the pop-up window before I could convince myself the
image filled the entire window (as opposed to simply having
a page BG color that matched the edge color).

--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.LensEscapes.com/ Images that escape the mundane
Jul 23 '05 #11

P: n/a
On 17 Nov 2004 11:43:27 -0800, RobB wrote:
Oops.
<shaking clenched fist in air>
*Damn* you!
</shaking clenched fist in air>
..Sorry, typo...


Ohh.. (mellows) well in that case I'll just demand a full refund. ;-)
Jul 23 '05 #12

P: n/a
On 17 Nov 2004 11:11:27 -0800, RobB <fe******@hotmail.com> wrote:

[snip]

My first remark is: what on Earth does this have to do with Andrew's post?
Please follow-up to the appropriate location.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
Why not Strict?

[snip]
var filepath = 'http://www.maineviews.com/albums/album11/';
Unnecessary.
var sHTML = '';

function getHTML()
{
return sHTML;
}
All of that is totally pointless.

[snip]
src = (filepath || '').concat(src);
Soon to be obsolete.
var l = (screen.availWidth - w - 10) * .5;
var t = (screen.availHeight - h) * .5;
That will piss some people off. It's also useless for tabbed browsers.
var config = 'width=' + w + ',height=' + h + ',left=' + l + ',top=' +
t + ',status=0';
You should never remove the status bar, beside it's not possible in decent
browsers (even IE). At minimum, the specified features should be

'status,scrollbars,resizable'

[snip]
'<body style="margin:0;background:'+BG+';' +
' onblur="setTimeout(function(){self.focus()},200)"' +
Well, won't that annoy people...
' onclick="self.close()">
....and that may confuse.

[snip]
<a href="#null" onclick="return pw('sugarshakers.sized.jpg', 640, 424,
'Sugar Shakers')">
The sensible thing would be to link to the actual image. You can then use

return pw(this.href, ...);

to open the image. This would remove any dependancy to Javascript.
<img src="sugarshakers.thumb.jpg" />


That's invalid for two reasons:

1) The alt attribute is required.
2) "Empty" HTML elements do not end with />. That's XHTML.

[snip]

Mike

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
Jul 23 '05 #13

P: n/a

Sorry guys, thanks for all your help. I'm still having problems with
this...

This is my coding so far. remember that im doing a picture album site
with all these thumbnails to popup in new javascript windows with no
borders. I want the window to appear around the image & thats it.

With the css code that was just posted, do i have insert to just the
beginning of my coding or do i insert around every thumbnail?

I'm new at this, so thats why its taking longer for me to understand.
thanks for your patience.

This my coding so far:

<html>
<head>
<title>MattMe</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<style type="text/css">

<!--
BODY {
scrollbar-face-color: #FF99CC;
scrollbar-shadow-color: #3333FF;
scrollbar-highlight-color: #3333FF;
scrollbar-3dlight-color: #3333FF;
scrollbar-darkshadow-color: #3333FF;
scrollbar-track-color: #3333FF;
scrollbar-arrow-color: #000000
}
-->
</style>

<body STYLE="background-color: transparent">
<center>
<table height="333" border="0" align="center" cellspacing="0">
<tr valign="bottom">
<td align="center"> <SCRIPT language="JavaScript">
<!--
function my_win()
{
window.open('picturealbum/MattMe%20Thumbnails/images/MattMe1_jpg.jpg','m
ywindow','width=306,height=257');
}
//-->
</SCRIPT> <A HREF="javascript:my_win()"><IMG
SRC="picturealbum/MattMe%20Thumbnails/thumbnails/MattMe1_jpg.jpg"
border="0"></A></td>
<td align="center"><a
href="picturealbum/MattMe%20Thumbnails/images/MattMe10_jpg.jpg"><img
src="picturealbum/MattMe%20Thumbnails/thumbnails/MattMe10_jpg.jpg"
border="0"></a>
</td>
<td align="center"><a
href="picturealbum/MattMe%20Thumbnails/images/MattMe12_jpg.jpg"><img
src="picturealbum/MattMe%20Thumbnails/thumbnails/MattMe12_jpg.jpg"
border="0"></a>
</td>
<td align="center"><a
href="picturealbum/MattMe%20Thumbnails/images/MattMe9_jpg.jpg"><img
src="picturealbum/MattMe%20Thumbnails/thumbnails/MattMe9_jpg.jpg"
border="0"></a>
</td>
</tr>
<tr valign="bottom">
<td align="center"><a
href="picturealbum/MattMe%20Thumbnails/images/MattMe13_jpg.jpg"><img
src="picturealbum/MattMe%20Thumbnails/thumbnails/MattMe13_jpg.jpg"
border="0"></a>
</td>
<td align="center"><a
href="picturealbum/MattMe%20Thumbnails/images/MattMe15_jpg.jpg"><img
src="picturealbum/MattMe%20Thumbnails/thumbnails/MattMe15_jpg.jpg"
border="0"></a>
</td>
<td align="center"><a
href="picturealbum/MattMe%20Thumbnails/images/MattMe2_jpg.jpg"><img
src="picturealbum/MattMe%20Thumbnails/thumbnails/MattMe2_jpg.jpg"
border="0"></a>
</td>
<td align="center"><a
href="picturealbum/MattMe%20Thumbnails/images/MattMe11_jpg.jpg"><img
src="picturealbum/MattMe%20Thumbnails/thumbnails/MattMe11_jpg.jpg"
border="0"></a>
</td>
</tr>
<tr valign="bottom">
<td align="center"><a
href="picturealbum/MattMe%20Thumbnails/images/MattMe5_jpg.jpg"><img
src="picturealbum/MattMe%20Thumbnails/thumbnails/MattMe5_jpg.jpg"
border="0"></a>
</td>
<td align="center"><a
href="picturealbum/MattMe%20Thumbnails/images/MattMe6_jpg.jpg"><img
src="picturealbum/MattMe%20Thumbnails/thumbnails/MattMe6_jpg.jpg"
border="0"></a>
</td>
<td align="center"><a
href="picturealbum/MattMe%20Thumbnails/images/MattMe7_jpg.jpg"><img
src="picturealbum/MattMe%20Thumbnails/thumbnails/MattMe7_jpg.jpg"
border="0"></a>
</td>
<td align="center"><a
href="picturealbum/MattMe%20Thumbnails/images/MattMe8_jpg.jpg"><img
src="picturealbum/MattMe%20Thumbnails/thumbnails/MattMe8_jpg.jpg"
border="0"></a>
</td>
</tr>
</table>
</center>
</body>
</html>

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 23 '05 #14

P: n/a
Thanks guys for being patient and helping me. But i dont have any idea
where to insert the previous codnig into my existing coding. Can someone
pls tell me where to put it in my code pls.....I just want to get rid of
the border and padding around the image in a new javascript pop-up
window
<html>
<head>
<title>MattMe</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<style type="text/css">

<!--
BODY {
scrollbar-face-color: #FF99CC;
scrollbar-shadow-color: #3333FF;
scrollbar-highlight-color: #3333FF;
scrollbar-3dlight-color: #3333FF;
scrollbar-darkshadow-color: #3333FF;
scrollbar-track-color: #3333FF;
scrollbar-arrow-color: #000000
}
-->
</style>

<body STYLE="background-color: transparent">
<center>
<table height="333" border="0" align="center" cellspacing="0">
<tr valign="bottom">
<td align="center"> <SCRIPT language="JavaScript">
<!--
function my_win()
{
window.open('picturealbum/MattMe%20Thumbnails/images/MattMe1_jpg.jpg','m
ywindow','width=306,height=257');
}
//-->
</SCRIPT> <A HREF="javascript:my_win()"><IMG
SRC="picturealbum/MattMe%20Thumbnails/thumbnails/MattMe1_jpg.jpg"
border="0"></A></td>
<td align="center"><a
href="picturealbum/MattMe%20Thumbnails/images/MattMe10_jpg.jpg"><img
src="picturealbum/MattMe%20Thumbnails/thumbnails/MattMe10_jpg.jpg"
border="0"></a>
</td>
<td align="center"><a
href="picturealbum/MattMe%20Thumbnails/images/MattMe12_jpg.jpg"><img
src="picturealbum/MattMe%20Thumbnails/thumbnails/MattMe12_jpg.jpg"
border="0"></a>
</td>
<td align="center"><a
href="picturealbum/MattMe%20Thumbnails/images/MattMe9_jpg.jpg"><img
src="picturealbum/MattMe%20Thumbnails/thumbnails/MattMe9_jpg.jpg"
border="0"></a>
</td>
</tr>
<tr valign="bottom">
<td align="center"><a
href="picturealbum/MattMe%20Thumbnails/images/MattMe13_jpg.jpg"><img
src="picturealbum/MattMe%20Thumbnails/thumbnails/MattMe13_jpg.jpg"
border="0"></a>
</td>
<td align="center"><a
href="picturealbum/MattMe%20Thumbnails/images/MattMe15_jpg.jpg"><img
src="picturealbum/MattMe%20Thumbnails/thumbnails/MattMe15_jpg.jpg"
border="0"></a>
</td>
<td align="center"><a
href="picturealbum/MattMe%20Thumbnails/images/MattMe2_jpg.jpg"><img
src="picturealbum/MattMe%20Thumbnails/thumbnails/MattMe2_jpg.jpg"
border="0"></a>
</td>
<td align="center"><a
href="picturealbum/MattMe%20Thumbnails/images/MattMe11_jpg.jpg"><img
src="picturealbum/MattMe%20Thumbnails/thumbnails/MattMe11_jpg.jpg"
border="0"></a>
</td>
</tr>
<tr valign="bottom">
<td align="center"><a
href="picturealbum/MattMe%20Thumbnails/images/MattMe5_jpg.jpg"><img
src="picturealbum/MattMe%20Thumbnails/thumbnails/MattMe5_jpg.jpg"
border="0"></a>
</td>
<td align="center"><a
href="picturealbum/MattMe%20Thumbnails/images/MattMe6_jpg.jpg"><img
src="picturealbum/MattMe%20Thumbnails/thumbnails/MattMe6_jpg.jpg"
border="0"></a>
</td>
<td align="center"><a
href="picturealbum/MattMe%20Thumbnails/images/MattMe7_jpg.jpg"><img
src="picturealbum/MattMe%20Thumbnails/thumbnails/MattMe7_jpg.jpg"
border="0"></a>
</td>
<td align="center"><a
href="picturealbum/MattMe%20Thumbnails/images/MattMe8_jpg.jpg"><img
src="picturealbum/MattMe%20Thumbnails/thumbnails/MattMe8_jpg.jpg"
border="0"></a>
</td>
</tr>
</table>
</center>
</body>
</html>
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 23 '05 #15

P: n/a
Andrew Thompson <Se********@www.invalid> wrote in message news:<hi*****************************@40tude.net>. ..
On 17 Nov 2004 11:11:27 -0800, RobB wrote:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

(snip)

That seems to do the trick. (Well, in IE in any case.)

Nice pics too, but is there any chance of you supplying
at least one without a border? I had to look closely
at the pop-up window before I could convince myself the
image filled the entire window (as opposed to simply having
a page BG color that matched the edge color).


Moz, Op & others (pay up!). Hey: I needed some demo pics fast so, used
google image search, hotlinking, naturally (bad dog). Those 'borders'
had text in them so I thought it wouldn't matter. My paid demos are
better. ;)
Jul 23 '05 #16

P: n/a
Eva Lean <ev***********@yahoo.co.uk> wrote in message news:<41**********************@news.newsgroups.ws> ...
Sorry guys, thanks for all your help. I'm still having problems with
this...

This is my coding so far. remember that im doing a picture album site
with all these thumbnails to popup in new javascript windows with no
borders. I want the window to appear around the image & thats it.

With the css code that was just posted, do i have insert to just the
beginning of my coding or do i insert around every thumbnail?

I'm new at this, so thats why its taking longer for me to understand.
thanks for your patience.

This my coding so far:

<html>
<head>
<title>MattMe</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<style type="text/css">

<!--
BODY {
scrollbar-face-color: #FF99CC;
scrollbar-shadow-color: #3333FF;
scrollbar-highlight-color: #3333FF;
scrollbar-3dlight-color: #3333FF;
scrollbar-darkshadow-color: #3333FF;
scrollbar-track-color: #3333FF;
scrollbar-arrow-color: #000000
}
-->
</style>

<body STYLE="background-color: transparent">
<center>
<table height="333" border="0" align="center" cellspacing="0">
<tr valign="bottom">
<td align="center"> <SCRIPT language="JavaScript">
<!--
function my_win()
{
window.open('picturealbum/MattMe%20Thumbnails/images/MattMe1_jpg.jpg','m
ywindow','width=306,height=257');
}
//-->
</SCRIPT> <A HREF="javascript:my_win()"><IMG
SRC="picturealbum/MattMe%20Thumbnails/thumbnails/MattMe1_jpg.jpg"
border="0"></A></td>
<td align="center"><a
href="picturealbum/MattMe%20Thumbnails/images/MattMe10_jpg.jpg"><img
src="picturealbum/MattMe%20Thumbnails/thumbnails/MattMe10_jpg.jpg"
border="0"></a>
</td>
<td align="center"><a
href="picturealbum/MattMe%20Thumbnails/images/MattMe12_jpg.jpg"><img
src="picturealbum/MattMe%20Thumbnails/thumbnails/MattMe12_jpg.jpg"
border="0"></a>
</td>
<td align="center"><a
href="picturealbum/MattMe%20Thumbnails/images/MattMe9_jpg.jpg"><img
src="picturealbum/MattMe%20Thumbnails/thumbnails/MattMe9_jpg.jpg"
border="0"></a>
</td>
</tr>
<tr valign="bottom">
<td align="center"><a
href="picturealbum/MattMe%20Thumbnails/images/MattMe13_jpg.jpg"><img
src="picturealbum/MattMe%20Thumbnails/thumbnails/MattMe13_jpg.jpg"
border="0"></a>
</td>
<td align="center"><a
href="picturealbum/MattMe%20Thumbnails/images/MattMe15_jpg.jpg"><img
src="picturealbum/MattMe%20Thumbnails/thumbnails/MattMe15_jpg.jpg"
border="0"></a>
</td>
<td align="center"><a
href="picturealbum/MattMe%20Thumbnails/images/MattMe2_jpg.jpg"><img
src="picturealbum/MattMe%20Thumbnails/thumbnails/MattMe2_jpg.jpg"
border="0"></a>
</td>
<td align="center"><a
href="picturealbum/MattMe%20Thumbnails/images/MattMe11_jpg.jpg"><img
src="picturealbum/MattMe%20Thumbnails/thumbnails/MattMe11_jpg.jpg"
border="0"></a>
</td>
</tr>
<tr valign="bottom">
<td align="center"><a
href="picturealbum/MattMe%20Thumbnails/images/MattMe5_jpg.jpg"><img
src="picturealbum/MattMe%20Thumbnails/thumbnails/MattMe5_jpg.jpg"
border="0"></a>
</td>
<td align="center"><a
href="picturealbum/MattMe%20Thumbnails/images/MattMe6_jpg.jpg"><img
src="picturealbum/MattMe%20Thumbnails/thumbnails/MattMe6_jpg.jpg"
border="0"></a>
</td>
<td align="center"><a
href="picturealbum/MattMe%20Thumbnails/images/MattMe7_jpg.jpg"><img
src="picturealbum/MattMe%20Thumbnails/thumbnails/MattMe7_jpg.jpg"
border="0"></a>
</td>
<td align="center"><a
href="picturealbum/MattMe%20Thumbnails/images/MattMe8_jpg.jpg"><img
src="picturealbum/MattMe%20Thumbnails/thumbnails/MattMe8_jpg.jpg"
border="0"></a>
</td>
</tr>
</table>
</center>
</body>
</html>

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Eva: you might want to start your own group. ;)

<html>
<head>
<title>MattMe</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
</head>
<style type="text/css">

<!--
BODY {
scrollbar-face-color: #FF99CC;
scrollbar-shadow-color: #3333FF;
scrollbar-highlight-color: #3333FF;
scrollbar-3dlight-color: #3333FF;
scrollbar-darkshadow-color: #3333FF;
scrollbar-track-color: #3333FF;
scrollbar-arrow-color: #000000
}
-->
</style>
<script type="text/javascript">

var picwin = null;
var sHTML = '';

function getHTML()
{
return sHTML;
}

function pw(src, w, h, title, BG)
{
if (null != picwin && !picwin.closed)
picwin.close();
var l = (screen.availWidth - w - 10) * .5;
var t = (screen.availHeight - h) * .5;
var config = 'width=' + w + ',height=' + h + ',left=' + l + ',top=' +
t + ',status=0';
title = title || 'Picture Window'
BG = BG || '#000';
sHTML = '';
sHTML += '<html><head><title>' + title + '</title></head>' +
'<body style="margin:0;background:'+BG+';"' +
' onblur="setTimeout(\'self.focus()\',100)"' +
' onclick="self.close()"><img style="border-width:0;cursor:pointer;"'
+
' title="click to close" src="' + src + '"></a></body></html>';

picwin = open('javascript:opener.getHTML()', 'picwin', config);
if (null != picwin && !picwin.closed)
picwin.focus();
return false;
}

</script>
<body STYLE="background-color: transparent">
<center>
<table height="333" border="0" align="center" cellspacing="0">
<tr valign="bottom">
<td align="center"><a
href="picturealbum/MattMe%20Thumbnails/images/MattMe1_jpg.jpg"
onclick="return pw(this.href,306,257,'Feh!')"><img border="0"
src="picturealbum/MattMe%20Thumbnails/thumbnails/MattMe1_jpg.jpg"
/></a></td>
</tr>
</table>
</center>
</body>
</html>

Add, rinse, repeat. Might want to use a different window title for
that first one.
Jul 23 '05 #17

P: n/a
On 18 Nov 2004 08:56:31 -0800, RobB wrote:

(snip my minor gripes asking for tweaks to free script)
My paid demos are better. ;)


LOL. Good point!

[ Hey.. what about if I *doubled* what I originally paid
you, would that make the difference? ;-) ]

--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.LensEscapes.com/ Images that escape the mundane
Jul 23 '05 #18

P: n/a
"Michael Winter" <M.******@blueyonder.co.invalid> wrote in message news:<opshmmqllzx13kvk@atlantis>...
On 17 Nov 2004 11:11:27 -0800, RobB <fe******@hotmail.com> wrote:

[snip]

My first remark is: what on Earth does this have to do with Andrew's post?
Please follow-up to the appropriate location.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">


Why not Strict?

[snip]
var filepath = 'http://www.maineviews.com/albums/album11/';


Unnecessary.
var sHTML = '';

function getHTML()
{
return sHTML;
}


All of that is totally pointless.

[snip]
src = (filepath || '').concat(src);


Soon to be obsolete.
var l = (screen.availWidth - w - 10) * .5;
var t = (screen.availHeight - h) * .5;


That will piss some people off. It's also useless for tabbed browsers.
var config = 'width=' + w + ',height=' + h + ',left=' + l + ',top=' +
t + ',status=0';


You should never remove the status bar, beside it's not possible in decent
browsers (even IE). At minimum, the specified features should be

'status,scrollbars,resizable'

[snip]
'<body style="margin:0;background:'+BG+';' +
' onblur="setTimeout(function(){self.focus()},200)"' +


Well, won't that annoy people...
' onclick="self.close()">


...and that may confuse.

[snip]
<a href="#null" onclick="return pw('sugarshakers.sized.jpg', 640, 424,
'Sugar Shakers')">


The sensible thing would be to link to the actual image. You can then use

return pw(this.href, ...);

to open the image. This would remove any dependancy to Javascript.
<img src="sugarshakers.thumb.jpg" />


That's invalid for two reasons:

1) The alt attribute is required.
2) "Empty" HTML elements do not end with />. That's XHTML.

[snip]

Mike


"Michael Winter" wrote: "Well, won't that annoy people..."

You said it, brother.

My...aren't we anal. Everything must be perfect, as if this were a
final exam.

Anyway I could encourage you to ignore any of my postings here? You
have no idea how annoying it is to know that they will have to pass
muster with the likes of you (arguably impossible).

RobB
Jul 23 '05 #19

P: n/a
On 18 Nov 2004 18:09:53 -0800, RobB <fe******@hotmail.com> wrote:

[snip]
My...aren't we anal. Everything must be perfect, as if this were a final
exam.
Perfect? No.

In the best interests of the end-user (which usually isn't the poster)?
Yes.
Anyway I could encourage you to ignore any of my postings here?
No. Feel free to ignore mine though.
You have no idea how annoying it is to know that they will have to pass
muster with the likes of you (arguably impossible).


The likes of me? You don't even know me!

I have no problem whatsoever with you, or anyone else, giving advice.
However, if I disagree, I will say so. I expect nothing less in return. I
make mistakes and have misconceptions, and I'm always grateful when they
are corrected.

I'm here to learn, as well as help as best I can. What about you?

Mike

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
Jul 23 '05 #20

This discussion thread is closed

Replies have been disabled for this discussion.