473,405 Members | 2,445 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Erasing border and padding in javascript window

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
19 4578
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
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
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
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
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
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
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
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
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
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
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
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

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
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
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
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
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
"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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: David | last post by:
Hi, I use the following code to open a javascript window. Is it possible to modify this to have the standard toolbar open in the window? Thanks <script language="JavaScript"...
5
by: Mark | last post by:
Hi all, how do I open a javascript window from a code behind page? I was using Response.Write("<script language='javascript'>window.open('url','name','options');</script>") but now for some...
1
by: bbcrock | last post by:
Is it possible to send attributes into this function to change the print preferences from Portrait to Landscape with IE 6.0 set as the standard browser? Right now I'm using ...
1
by: DaniltonW | last post by:
I am trying to create a code for add a page to the favorite but "AddFavorite" not appears in the following function: javascript: window. external. AddFavorite? In javascript:window.external. does...
5
by: zzapper | last post by:
Hi, I use a JavaScript window to access a library of songs when the user picks one this is written to the users database record (PHP/MySQL). When the use closes the JavaScript window he returns to...
2
by: abhilash12 | last post by:
pls help me when mouse move on the cell how can identify cell border using javascript
3
by: =?Utf-8?B?Sm9obg==?= | last post by:
Hi, I have the following in my asp .net web page. It opens a separate browser window. However, on the main page, all of the contents is gone and shows nothing but . I have to use the Back...
1
gchq
by: gchq | last post by:
Hi there I have a Table nested in a Div that in turn is nested in panel (with scrollbars) in turn nested in a multiview.. The table has the class set as 'print' - that points to a css file via...
5
by: gvamohan | last post by:
hai every one iam opening an window through javascript <script type="text/javascript" language="javascript"> var k=false; ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.