John T. Hansen

Navigation

Skip navigation.

Search

Site navigation

Email conversation

FromJohn T. Hansen
ToMe
Subjectperfect popup not quite fullscreen
Date8 October 2005 04:25
I just found your perfect popup script today. AWESOME, btw! I just have one
little question/comment/observation. or something.

I was able to integrate your script into my php image gallery. I noticed
that when I have an image larger than my screen's resolution (1280 x 1024),
the image is a little *larger* than fullscreen in FireFox (1.0.7) and just a
little *smaller* than fullscreen in MSIE (6.0.2900). I am running XP Pro on
my computer. Here's a URL to my gallery:
[URL]

And here's a specific page with the problem I'm encountering.
[URL]

The offset isn't too bad. It's just within my acceptable range where, if
there is no solution, it wouldn't bother me too much. I was just wondering
if there may be some calculation that may be slightly off. I don't know.
Either way, great script. Very easy to follow. Thanks!

* John
FromMe
ToJohn T. Hansen
SubjectRe: perfect popup not quite fullscreen
Date8 October 2005 13:04
John,

> I was able to integrate your script into my php image gallery. I noticed
> that when I have an image larger than my screen's resolution (1280 x 1024),
> the image is a little *larger* than fullscreen in FireFox (1.0.7) and just a
> little *smaller* than fullscreen in MSIE (6.0.2900).

Funny, you ticked the box, but you didn't seem to read ...
http://www.howtocreate.co.uk/sendEmail.php#testbrowsers

> The offset isn't too bad. It's just within my acceptable range where, if
> there is no solution, it wouldn't bother me too much.

well, here's the thing. a real "maximised" window on windows is positioned
at -4,-4 and is 8 pixels higher and wider than the available width of the
screen itself. The resize routine tries to use the maximum space, which in
your case ends up 8 pixels bigger than the screen space (that is the size
that Windows allows).

Firefox allows this. Internet Explorer seems to get confused about whether
or not it has a scrollbar showing. Since your pictures are much bigger than
the window, I suggest you enable scrollbars anyway, otherwise it is
impossible to see all of them. If you are lucky, IE might start behaving -
no promises though, it is IE after all.

Change this:
scrollbars=no
to this:
scrollbars=yes


Mark 'Tarquin' Wilton-Jones - author of http://www.howtocreate.co.uk/
FromJohn T. Hansen
ToMe
SubjectRe: perfect popup not quite fullscreen
Date8 October 2005 20:15
Thanks for the quick response. I updated the script like you said and it
looks exactly the same in both browsers. Oh well, I'll tinker with it a
little bit to see if I can fix it. Thanks!

And for the record - I ticked the box because I *did* read everything...
which by the way, I've never seen someone have so many demands before
someone qualifies for support. But hey, it's your script. Your site, your
rules, right? Keep that in mind when you read on...

Anyway, I don't check the script Opera because I don't have Opera. I don't
have Opera because no one surfing my site uses it. I've faithfully tracked
my web site stats since the site opened in 1997. MSIE consistently wins the
browser war with 85%+ every month. I'm a Firefox user, but I'm part of the
small 8% of FireFox users on my site. There are other browsers in the list,
but Opera consistently has a big fat ZERO next to its name. So why code for
a browser to which no one uses? Same reason you don't open a restaurant that
only serves fried cat intestines. Don't do it if there's no demand for it.

But I'll keep watching the stats. Once I see the stats reflecting Opera use,
I'll consider downloading it and testing my site in it. But for now people
are just *asking* about Opera support on my forum, and not actually
*surfing* with it.

Thanks again...

-- John --
FromMe
ToJohn T. Hansen
SubjectRe: perfect popup not quite fullscreen
Date8 October 2005 22:40
John,

Good to hear you got it working nicely.

> And for the record - I ticked the box because I *did* read everything...
> which by the way, I've never seen someone have so many demands before
> someone qualifies for support. But hey, it's your script. Your site, your
> rules, right? Keep that in mind when you read on...

indeed it is :)

I know it may seem demanding, but you are using a script I wrote, and asking
me for help, to give up some of my own time (which I am happy to do). By
testing everything for me, you save me some time. When you think how many
people contact me, that adds up to a lot of time that is saved by users who
follow the guidelines. They are not just there for fun.

> Anyway, I don't check the script Opera because I don't have Opera.

http://www.opera.com/download

now you have it

> I don't have Opera because no one surfing my site uses it.

You just asked me to go there and help you with something. Guess what I use.

However, it is hardly surprising that you don't get many visitors using it
if you don't make sure your site works in it right? :)

ok, so I know that Opera does not have such a big user base in USA as in
Europe (in Poland, for example, it is over 7%), but since it has now gone
free, it is likely to get a higher user base, and I guess you would want to
be prepared for the future.

> So why code for a browser to which no one uses?

Because people do use it. I use it. It's such a funny thing:
"please help me make my site work for me. I don't care if it doesn't work
for you." Why would people expect me to help them when they have that
attitude? It is very insulting to me. Try seeing it from the other side :)


Anyway, let me know if/when you need a hand with anything else.


Tarquin
FromJohn T. Hansen
ToMe
SubjectRe: perfect popup not quite fullscreen
Date9 October 2005 23:25
Tarquin,

>>You just asked me to go there and help you with something. Guess what I
>>use.

	With all do respect, what you use is irrelevant because I'm not
coding my site for you. I'm coding for *my* viewers. If you were regular
visitor to my site and you used Opera, then we'd have something to talk
about. But I know you *aren't* a regular visitor because of my "OPERA =
ZERO" stats. I don't see how your browser preference will solve my problem.
If I'm having a problem with Browser A and Browser B, what good would it be
to test it in Browser C??? If there is a problem in Browser C, and that
problem gets resolved, the problem is still going to be there in Browsers A
& B.

For example, let's say your roof was leaking and you called a contractor
over to your house to fix it. When the contractor gets there he says,
"Hmmmm... I can fix that, but let me take your car out for a spin first to
make sure there's nothing wrong with it." See? What does one have to do with
the other? Find all the things wrong with that car you want, that roof is
still going to be leaking when the car's done.

[Ed. what an utterly dumb, stupid and irrelevant analogy - oh well]

>>However, it is hardly surprising that you don't get many visitors using 
>>it if you don't make sure your site works in it right?  :) 

	I've got a forum. All they gotta do is ask or suggest it. If enough
people want it, they'll get it. It's that simple.

>>ok, so I know that Opera does not have such a big user base in USA as in 
>>Europe (in Poland, for example, it is over 7%), but since it has now 
>>gone free, it is likely to get a higher user base, and I guess you would 
>>want to be prepared for the future.

	I will definitely keep my eye on it. We just started testing our
site in Safari because of its recent rise (albeit very small) in popularity.
We've got less than 2% of our guests use Safari, but that's 2% I wouldn't
normally have if I didn't code for them. Once I see my Opera stats equaling
anything more than ZERO, then I'll start coding for it.

>>>> So why code for a browser to which no one uses?
>
>>Because people do use it.

	I don't deny people use it, but those people aren't visiting my
site. I thought it was implied that I was speaking of my site's visitors
when I said "no one" uses it.

>>I use it. It's such a funny thing:
>>"please help me make my site work for me. I don't care if it doesn't 
>>work for you." Why would people expect me to help them when they have 
>>that attitude? It is very insulting to me. Try seeing it from the other 
>>side  :) 

	Well, it shouldn't be insulting to you. The bulk of my users are
using FireFox and MSIE. That's who I code for. Them. My site's visitors. Not
you. Yes, you created the script but what difference does it make what
browser you use. I said I'm having the problem in FireFox and MSIE. That's
where the problem is. Bringing another browser into the mix is completely
irrelevant.

>>Good to hear you got it working nicely.

	I looked back at my message and I guess I didn't make this clear.
What I meant by "it looks exactly the same in both browsers" is that it
looks exactly what they looked like before. No changes to either browser. I
know I made it sound like the issue was fixed. I apologize for that.


-- John
FromMe
ToJohn T. Hansen
SubjectRe: perfect popup not quite fullscreen
Date9 October 2005 23:46
John,

> I don't see how your browser preference will solve my problem.

because different browsers respond differently to the same issues (as you
emailed me about in the first place).

I am familiar with the responses of many browsers. By telling me how each of
the browsers respond, I can very quickly build up a picture of what the
problem is likely to be. The more browsers you test in, the less I have to
test in. It helps me solve the problem faster without taking too much of my
time. In general, Opera's response is the most telling for me, so it is the
most beneficial.

You may see a problem in browser a and not in b, but by telling me how
browser c responds, I am far more likely to understand what the likely cause
is. If you don't check it, then I will still have to check it in order to
work out what the problem is. That takes my time.

So if you want my help with anything, please test in Opera. It really is
that simple. If you do not want to test in Opera, that is fine, you can
still use the scripts, but don't expect me to want to help.

Hundreds of people have contacted me to ask for help with various issues. If
each of those people takes just 10 minutes to check the different browsers,
it means I can take those 10 minutes less to analyse the problem. Ten
minutes for each of them adds up to weeks of my own time that is saved. If
people want my help they have to be willing to help me to help them, not
just give me what they want, instead of what I have asked for.

Anyway, sending these emails is now taking up far more of my time than I
want to devote to this non-issue, so please restrict further communication
to help requests. Until then, enjoy the scripts.


Tarquin

Ed. I was also working on an analogy (to go along with the bizzare one that John gave), but then I decided I didn't want to waste my time on it. But it stuck in my brain (the way ideas do), so I decided to write it down so I could get some sleep. If you are feeling bored, you can read it here:

You have a leaking pipe, so you call a plumber to fix it. The plumber asks "do you have electricity?". You reply "I have hot water". That information may be helpful, but it did not answer the question, and the plumber still does not know if he has to bring the gas powered, or electric powered soldering tools.

Anyway, that still does not matter. The simple conclusion is that people ask you to do things for a reason. If you want them to help you, try doing what they ask, not what you decided to do instead.

FromJohn T. Hansen
ToMe
SubjectRe: perfect popup not quite fullscreen
Date10 October 2005 14:00
Tarquin,

>>The more browsers you test in, the less I have to test in. It helps me
>>solve the problem faster without taking too much of my time. In general,
>>Opera's response is the most telling for me, so it is the most beneficial.

	Fair enough. I downloaded Opera last night and the picture popup
looks way worse in this browser than any other. On my screen, the entire "X"
button in XP is off screen on a full screen image. Also, the entire window
isn't going fullscreen, it's only going as big as the Opera web area,
leaving the Opera title bar, the Opera toolbar, and the Opera tab bar
exposed. I'd be happy to send you a print screen of this. I think you
mentioned you already tested it in Opera, so you probably know exactly what
I'm talking about. I hope that now that you know what it's doing in Opera,
this helps you solve the problem I'm having in MSIE and FireFox.


>>Anyway, sending these emails is now taking up far more of my time than I 
>>want to devote to this non-issue, so please restrict further 
>>communication to help requests. Until then, enjoy the scripts.

	I appreciate the help, but no one is making you hit that "reply"
button. And it's not a "non-issue" because I'm still having trouble with the
script. If you'd stop trying to sell me on the Opera browser, you might
realize this. I downloaded Opera and I'm keeping it installed. That should
make you happy, so maybe now we can focus on the faults of this script, eh?
FromMe
ToJohn T. Hansen
SubjectRe: perfect popup not quite fullscreen
Date10 October 2005 14:42
John,

> Also, the entire window
> isn't going fullscreen, it's only going as big as the Opera web area

Right, this is because (by default) Opera runs as an MDI application. When
running as a single window (like IE) app, it has a similar problem to the
others, including running behind the taskbar.

> this helps you solve the problem I'm having in MSIE and FireFox.

Indeed it has. The problem is that your images are huge. Too big for either
your screen, or my screen. Windows is not limiting the size of the browser
window to a sensible amount.

There is an alternative version of the script that is designed to cope with
this:
http://www.howtocreate.co.uk/perfectPopups.html
either the "Preventing the popups from becoming larger than the screen"
section, or the "Resizing the images to prevent them from becoming larger
than the screen" section (this one includes an alternative download that you
can use, since there are a lot of changes that need to be made).

In both cases, it has to limit the size of the window, but it cannot be
perfect, because the resize routine needs some extra space. As a result, the
windows are a little smaller than fullscreen.

If you need to change that behaviour (so it always uses maximum possible
space), you should use the downloadable script, and after this line:
(oTimeClose?('window.setTimeout(\'window.close()\','+oTimeClose+');\n'):'')+
add this:
'document.images[0].onclick();\n'+

> If you'd stop trying to sell me on the Opera browser

Not trying to sell. I can see it is not the browser for you. I just asked
you to test :)

Anyway, hope the outcome is satisfactory.
FromJohn T. Hansen
ToMe
SubjectRe: perfect popup not quite fullscreen
Date10 October 2005 20:15
Tarquin,
	Thanks for the suggestions. I made the necessary changes to the
script, but now the images load in a new tab (Opera, FireFox) or similar to
the "_self" command MSIE. I re-uploaded it back to my original version (the
version before I started toying with it today).

	Before I decided on using 4images for my site's image gallery, I
went with [brand]. When I did that, I customized it by adding someone else's
popup script (this was a few months ago). Anyway, I tried to see what works
about that script's fullscreen popup and apply it to your script. I couldn't
quite figure it out. I uploaded a sample gallery if you want to check it
out.

[URL]

	All of the images are various sizes, smaller than 800x600. The file
"muppets_015" is the only one that is super-sized (2048x1536). In MSIE and
Firefox, the windows pop-up to the correct screen resolution, with no
bleeding off-screen. In Opera, it still cuts some off at the bottom of the
fullscreen image, but at least it's the correct width from left to right. 

	I'm not sure if there's something in the [brand] script that would be
the missing piece of the puzzle to all of this. I'd still rather use your
script since it starts with a certain size and resizes the browser *UP*
rather than the [brand] script where it starts fullscreen, then resizes the
browser *DOWN*.

I can send you the javascript, but I think you can get to everything just by
viewing the source.

-- John
FromMe
ToJohn T. Hansen
SubjectRe: perfect popup not quite fullscreen
Date10 October 2005 20:41
John,

> now the images load in a new tab (Opera, FireFox) or similar to
> the "_self" command MSIE.

Opera will use a tab if it is in MDI mode (tools - prefs - general - open
pages in tabs), so that is understandable. Firefox, on the other hand,
defaults to using separate windows for popups. Check that Firefox is set to
open in new windows, and not tabs (tools - options - tabs - untick "force
links that open new windows to open in ...").

But now to IE, sounds like something went wrong in this line:

var imgWin = window.open('','_blank','scrollbars=yes,resizable=1,width='+....);

is something wrong in that line? possibly either _blank is missing or the
options are wrong
This site was created by Mark "Tarquin" Wilton-Jones.
Don't click this link unless you want to be banned from our site.