Email conversation
From | Jake Zoll |
To | Me |
Subject | My not so perfect Popup |
Date | 8 October 2004 07:01 |
Hi Mark,
[reference to my Perfect Popups script page]
I am an amateur webdesigner and professional dental tech (I make
dentures) and an avid auto racing fan. My web site, which features
hundreds of images has caught the fancy of a few like minded fans and is
regarded as a promotion of sorts by Oswego Speedway (NY,USA) which is
near my Syracuse NY home. They have given me media privileges for my
photo opps and provided me with free admission to their events... all
unsolicited. It's an honor and a burden all at once because I now feel
obligated to have the most professional presentation possible.
I have been playing with this web design thing for about 6 years
now, I was totally computer illiterate 8 years ago. It has been fun
learning html and recently Iv'e begun to toy with css, but I'm in a
little over my head sometimes... seems I always try to deploy the latest
stuff, like my current scrolling frames emulation.
CSS has seemed easy however compared to the years Iv'e spent
looking for the perfect popup! I'm 53 years old and it seems like I'll
run out of time before I get the hang of javascript. I have searched
endlessly over the last month and have found all the features I want,
but none wrapped into the same code:-(
If you can find the time, please look at my popup test page:
http://xxx.xxxxxxxxx.xxx/xxxxxxxxxxxx.xxx You will have a chance to
meet me and study my popup adventures all in one fell swoop!
My image gallery pages are:
http://xxx.xxxxxxxxx.xxx/page1.html
http://xxx.xxxxxxxxx.xxx/page2.html
http://xxx.xxxxxxxxx.xxx/page3.html
My popup wish list would include:
* autodetect image dimensions
* ability to right click/save image
* click off window to close as well as a close window button on a
bottom right margin.
* auto size to image
* no scroll bars, no status or menus... no borders?!?
* ability to autoclose after a set period of time.
Iv'e seen all these features in various codes but I lack the ability to
combine them, although my attempts have been rather amusing at times!
At one point I inserted a table with a close button on the bottom of
your perfect popup, but alas... scrollbars appeared there too.
This is a hobby for me, I share my images at no profit. I'm not a rich
man but finally finding the right script would be worth a few bucks to
me, my wife would appreciate it too as Iv'e spent way too much time
searching and trying to cobble scripts together lately!
Michael Brandt of [an external web site] gave
me permission to lift the code off his page at
[the page with an example] but after some
thrashing, I discovered dimensions had to be entered into each link. It
seems his [brand name] software finds the size and writes the (humungous) link
code, but his software comes only as a Dream Weaver extension and I
don't have/want or can afford Dream Weaver. He told me he could write
the code for me but it would cost $200... ouch. Guess i can live without
the nice margin at the bottom and the autoclose.
btw, I use mozilla 1.6 and test locally with IE6 and 5.5
I really appreciate your HowToCreate site. I have cunsulted it often and
will continue to do so and a link will go up on my site if I ever get
past this popup obsession and update again!
Sorry about the length of this message, I do tend to run on... if you
could point me in the right direction or even just show me how to
include a close button, that would be great. If you became really
ambitious and wrote my perfect popup... well, can you beat Michael's
price at all?
Hope to hear from you.
Jake Zoll
Jake,
I have made a specially modified version of the perfect popups script.
> autodetect image dimensions
done
> ability to right click/save image
done - as long as you give them enough time :)
> click off window to close
done
> a close window button on a bottom right margin.
done - if you want to align the link to the right, you must give it the
class="makeright" - the script will automatically detect links
like this and move them to the right after it re-adjusts the size.
> auto size to image
done
> no scroll bars, no status or menus... no borders?!?
done, but you must have window edge borders (these are virtually
non-existent in Mozilla anyway) - status is also mandatory in IE 6 Win XP
SP 2
> ability to autoclose after a set period of time.
done
If used correctly, it is even protected against aggressive popup blockers
(it treats it as a regular link instead, so they will still see the picture,
just not in a popup).
It should say the words 'Loading image ...' behind the image. It does not
have a background loading graphic, but you could add that by modifying the
image tag to include:
style="background: #bbb url(loading.gif) no-repeat scroll 50% 50%;"
I have attached the JS file that you need - it has instructions at the top.
I have also added an example of its use to the bottom of
http://www.howtocreate.co.uk/perfectPopups.html
In my example, I notice a tiny 1px gap at the bottom in mozilla, this is
actually due to the way that mozilla treats inline boxes in paragraphs, and
is caused by the particular style combination that I applied to the link -
I couldn't see any way to force it to remove the gap without producing a
scrollbar, but it shouldn't matter because it looks good enough as it is
for me.
style="text-decoration:none;color:#777;background-color:#bbb;
font-weight:bold;border-left:2px solid #000;"
Hope this serves your purpose.
Mark 'Tarquin' Wilton-Jones - author of http://www.howtocreate.co.uk/
From | Jake Zoll |
To | Me |
Subject | not so perfect Popup apology |
Date | 9 October 2004 19:49 |
Hi again Mark,
What a dummy I am! If I had just scrolled to the bottom of the page I would
have seen the info concerning the 'close' link and the optional auto
timeout... I am truly sorry I took your time like that.
I have been able to implement everything and you have no idea how grateful
I am for the info posted at your site.
The only remaining problem is:
the right click, "save image as" functions as desired in Mozilla but the
right click causes the popup to close with IE6 even though the user is not
swiching focus to another window.
I can and will work around this by setting link parameter to false if there
is no easy solution for this.
Again, sorry for wasting valuable time...
Jake
From | Me |
To | Jake Zoll |
Subject | Re: not so perfect Popup apology |
Date | 9 October 2004 20:29 |
Jake,
You are not a dummy at all. I wrote that version because you asked for it,
and added it to the site :) It wasn't there before.
> right click causes the popup to close with IE6 even though the user is
> not swiching focus to another window.
I doubt that there is any way to avoid it (short of making a timeout and
hoping that they can save before the timeout expires). IE seems to have a
slightly screwed up idea of what a focused window is.
Tarquin
From | Jake Zoll |
To | Me |
Subject | Perfect Popup users |
Date | 26 November 2004 6:48 |
Hi Mark,
Just an updated thank you here... your pop-up script is the engine that
drives my image laden site! I recently deployed the code for Resizing
the images to prevent them from becoming larger than the screen.
That was sorta lucky because my js file did not contain this line:
'var oH = document.images[0].height, oW = document.images[0].width;\n'+
So I randomly inserted it and the additional lines after:
'if( !document.images[0].height || window.doneAlready ) { return; }\n'+
//in case images are disabled
An animated loading gif has also been deployed although I am not sure I
have inserted the pre-load code correctly... I placed it in the head of
each XHTML page and it looks like this:
<!--
<script type="text/javascript" language="javascript">
var loadImg = new Image(); loadImg.src = 'xt/isloading2.gif';
</script>
-->
This all seems to work in an accecptable manner with IE6 @ 800x600 or
above. I have determined than 90% of my visitors use IE6.
with Mozilla and Firefox, the loading gif remains in view on the right
side of an expanded popup even after the image has loaded... a bug that
I suppose I can live with for now.
I have read your email page at length and find it to be a valuable
source of information... I am of course very interested in messages that
pertain to perfect popups and sometimes wish I could visit the sites of
other users in order to see how your script is deployed elsewhere.
I suspect that the links are removed to protect their privacy and I have
to respect that... but, Well I don't know, Have you thought about
hosting a forum?
Thanks again for being there...
Jake
From | Me |
To | Jake Zoll |
Subject | Re: Perfect Popup users |
Date | 26 November 2004 9:48 |
Jake,
> Just an updated thank you here... your pop-up script is the engine
> that drives my image laden site!
Always good to feel useful :)
> my js file did not contain this line:
'var oH = document.images[0].height, oW = document.images[0].width;\n'+
Hmm, that's a good point ... I will need to work out the right way to do
that. It is not so easy with the close link because you still have to take
the height of that link into account, and the regular size restriction I
described does not do that. It will work for you the way you have done it,
but I will make a more generic version that should suite all situations,
and put it online when I work out how
Your preloading script has the comments in the wrong place, they should be
inside the script tags
<script type="text/javascript" language="javascript"><!--
var loadImg = new Image(); loadImg.src = 'xt/isloading2.gif';
//--></script>
> with Mozilla and Firefox, the loading gif remains in view on the right
ah yes, it fires onload too quickly. That is why I recommend using a
background image because it will not be a part of the popup code itself,
even though it does look better the way you have done it.
You could apply it to the body instead:
<body style="background: #999999 url(xt/isloading2.gif) no-repeat scroll top right;" ...
> I have read your email page at length
> I suspect that the links are removed to protect their privacy
I actually remove them because I do not want to be abused as a source of
advertising. Otherwise someone could email in with a fake problem and put
a few links to their page in the email, just so they could get the benefit
of my search engine rankings and visitors. It does have the unfortunate
effect that I then have to apply this to everyone, but since you asked ...
I'll see what I can dig out.
Many of them are web developers who are using them on other sites, and even
after burrowing around their project sites for a while I can't see where
they are used. I have about half of my emails here, and unfortunately, the
other good examples are on my home computer. The best examples are your own,
but I did also manage to find these ones:
Jerry Obrecht is using them for map previews
http://www.howtocreate.co.uk/emails/JerryObrecht.html
[Jerry Obrecht's page]
Clemens Hermann is using them for resizing to fit a series of
administration forms
http://www.howtocreate.co.uk/emails/ClemensHermann.html
[Clemens Hermann's page]
maximised which causes the script not to resize in Opera and the Mozillas)
> Have you thought about hosting a forum?
I have thought about it, yes, but there are a couple of reasons why I do
not.
1. On my current host, a forum would blow me way over bandwidth.
2. I visit many web development forums, and while many people have good
attitudes, there are also many who have totally the wrong attitudes. My
site is mainly aimed at how to defeat browser compatibility issues with the
minimum of effort, but I see so many forums littered with the arrogant
attitudes of people who do not want to make any effort at all. If that is
not bad enough, I also see far too many conversations where I feel I really
could contribute, that instead end up as major flame wars between a few of
the Firefox users and Opera users (and even occasionally some IE users),
filled with petty "my browser is better than your browser" arguments, and
totally ignoring the original problem. The fact is that people use both of
them, so it doesn't matter which one is better for each person. The fact is
that people use what suits them best, and as web developers, I feel we have
the duty to serve all of them. Seeing these petty arguments spoil the
reputations of these excellent browsers really angers me, and I worry that
if I were to host a forum of a web development nature, I would probably end
up banning them all from it.
You can see from this email how I feel about these attitudes:
http://www.howtocreate.co.uk/emails/Zach.html
and I really don't want to make myself angry with the occasional idiot on a
forum.
*deep breath*
I may do it one day. I'm just waiting for these "fan boys" to grow up.
Maybe that is wishful thinking ...
Tarquin
From | Jake Zoll |
To | Me |
Subject | Re: Perfect Popup users |
Date | 26 November 2004 17:57 |
Mark,
> Always good to feel useful :-)
Useful is a huge understatement, your prompt replies impress me most...
you are very generous with your time.
> Your preloading script has the comments in the wrong place, they
should be inside the script tags
Doh! must be my advanced years catching up with me... I knew that, but
forgot!
I will implement the other changes you have suggested and keep an eye
out for Perfect popup updates from my Mozilla side bar...
As far as forums are concerned, you said:
> I may do it one day. I'm just waiting for these "fan boys" to grow
up. Maybe that is wishful thinking ...
I read your exchange with Zach and agree completely that there are far
too many narrow minded attitudes out there... and that's a shame,
especially when those people might otherwise have a wealth of
information to share. My son, who is 19 yrs old now, has become quite
accomplished at web design ([site link]) and all things
computer. It is my hope that he will become more tolerant of those of us
that still use methods,software,operating systems, etc that he often
takes a militant stand against. Such an attitude often seems to abort
any further useful sharing of information.
Thank you for the links, I intend to visit those sites soon and possibly
share useful info with them.
Jake