Bryan Marks

Navigation

Skip navigation.

Search

Site navigation

Email conversation

FromBryan Marks
ToMe
SubjectFollow-up to Suggested Enhancement to popImageExtra()
Date28 April 2005 18:12
Attachmentsfiles demonstrating the use of my script
Mark,
 
Let me also add my thanks to you for posting this script.  It has saved
me a lot of trouble.
 
However, as I tried to use it, the AutoClose and oTimeClose functions
in the html/javascript were still set to close the window either
automatically (I fixed that by changing the time value to 90000000) or
when I clicked to zoom in on the initial pop-up window.  Also, the text
at the top of your script wasn't working properly for me.  It saved me
some headaches to simply enter the values for the left & top positions
and screen width/height in the var imgWin line rather than use
variables.  That and some minor isses are resolved in the attached text
file.  But please don't think I'm complaining--your code has been a real
help!!!
 
I do have a question, however.  What would I need to do to: 
 
1. have a bigger-than-the-screen image immediately open as full-sized
with a scrollbar, instead of being prompted to click to resize the
image, and
 
2. have the "hover" message prompt the user to click the image to close
it rather than click the image to resize it, and actually have that
work?
 
3. have the contents of each window be replaced by the next item
clicked?
 
I know where to change the "hover" message 'document.images[0].title =
\'Click to resize image\', but I'm not sure how to do the other things
in #1-3 above.  As a second script, I've attached the code used to
generate three thumbnail images which link to pop-ups of full-sized
images in a table.  I'd like the user to click a thumbnail, have the
full image appear with a scrollbar, and prompt them to click on the
window to close it--but if they minimize the window, the next image
would replace the current image instead of appearing in a new window.
 
Any help you can provide me would be greatly appreciated!
 
Sincerely,
 
Bryan Marks
FromMe
ToBryan Marks
SubjectRe: Follow-up to Suggested Enhancement to popImageExtra()
Date29 April 2005 22:45
Bryan,

> However, as I tried to use it, the AutoClose and oTimeClose functions
> in the html/javascript were still set to close the window

They are optional parameters that you can use when calling the function.
Setting them to false and 0 respectively should have the desired effect.
onclick="return popImageExtra(this.href,'Image',false,0,extraHTML);"

> 1. ...
> 2. ...

after this line (it's near the bottom):

'if( !window.opera ) { x.moveTo(Math.round((scW-oW)/2),Math.round((scH-oH)/2)); }\n'+

add this:

'if( document.images[0].onclick ) { document.images[0].onclick(); }\n'+
'document.images[0].onclick = function () { window.close(); };\n'+


Mark 'Tarquin' Wilton-Jones - author of http://www.howtocreate.co.uk/
This site was created by Mark "Tarquin" Wilton-Jones.
Don't click this link unless you want to be banned from our site.