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

JavaScript Image Popup's

P: n/a
there are many versions of JavaScipt image popups exist which show image
preview when we click on a thumbnail image to view a larger version.
What is the best way?

Oct 14 '08 #1
Share this Question
Share on Google+
13 Replies


P: n/a
SAM
Le 10/14/08 5:06 PM, Santander a e'crit :
there are many versions of JavaScipt image popups exist which show
image preview when we click on a thumbnail image to view a larger version.
What is the best way?
This one :
<http://www.huddletogether.com/projects/lightbox2/>
or that one :
<http://www.cssplay.co.uk/menu/gallery.html>
??
Oct 14 '08 #2

P: n/a
both looks nice, not not too practical. The 1st sample takes a time when
load/adjust window, plus add this Vista "black background" effect, whereas
the regular javascript popup works faster - just open on click and close on
click. 2nd one show preview on mouseover. What I meant is simple popup that
opens on click on closes on click.

thanks.
-----
"SAM" <st*********************@wanadoo.fr.invalidwrote in message
news:48*********************@news.orange.fr...
Le 10/14/08 5:06 PM, Santander a e'crit :
>there are many versions of JavaScipt image popups exist which show image
preview when we click on a thumbnail image to view a larger version.
What is the best way?

This one :
<http://www.huddletogether.com/projects/lightbox2/>
or that one :
<http://www.cssplay.co.uk/menu/gallery.html>
??
Oct 14 '08 #3

P: n/a
Santander wrote:
there are many versions of JavaScipt image popups exist which show image
preview when we click on a thumbnail image to view a larger version.
What is the best way?
Probably nothing that already exists, including Lightbox & Co. It needs to
be interoperable, fully standards-compliant, easy to write, and must work if
client-side script support is disabled; pick two.

Your From header is borken.
Score adjusted

PointedEars
--
Use any version of Microsoft Frontpage to create your site.
(This won't prevent people from viewing your source, but no one
will want to steal it.)
-- from <http://www.vortex-webdesign.com/help/hidesource.htm>
Oct 15 '08 #4

P: n/a
Thomas 'PointedEars' Lahn wrote on 15 okt 2008 in comp.lang.javascript:
Your From header is borken.
Borken = place in Germany.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Oct 15 '08 #5

P: n/a
In comp.lang.javascript message
<Xn********************@194.109.133.242>, Wed, 15 Oct 2008 18:51:29,
Evertjan. <ex**************@interxnl.netposted:
>Thomas 'PointedEars' Lahn wrote on 15 okt 2008 in comp.lang.javascript:
>Your From header is borken.

Borken = place in Germany.
^s
See <http://en.wikipedia.org/wiki/Borken>.

--
(c) John Stockton, nr London UK. ??*@merlyn.demon.co.uk Turnpike v6.05 MIME.
Web <URL:http://www.merlyn.demon.co.uk/- FAQish topics, acronyms, & links.
Check boilerplate spelling -- error is a public sign of incompetence.
Never fully trust an article from a poster who gives no full real name.
Oct 16 '08 #6

P: n/a
so what is sample of easy, interoperable, standards-compliant, working even
when client-side script support is disabled script?
Somethingf simple with href?

Santander
---------

"Thomas 'PointedEars' Lahn" <Po*********@web.dewrote in message
news:48**************@PointedEars.de...
Probably nothing that already exists, including Lightbox & Co. It needs
to
be interoperable, fully standards-compliant, easy to write, and must work
if
client-side script support is disabled; pick two.

Your From header is borken.
Score adjusted

PointedEars
--
Use any version of Microsoft Frontpage to create your site.
(This won't prevent people from viewing your source, but no one
will want to steal it.)
-- from <http://www.vortex-webdesign.com/help/hidesource.htm>
Oct 17 '08 #7

P: n/a
SAM
Le 10/14/08 6:10 PM, Santander a écrit :
both looks nice, not not too practical. The 1st sample takes a time when
load/adjust window, plus add this Vista "black background" effect,
whereas the regular javascript popup works faster - just open on click
and close on click. 2nd one show preview on mouseover. What I meant is
simple popup that opens on click on closes on click.
The second works too with onclick
(probably not with IE < 8)

You asked the best ways, no ?
They are.

Popups are most of the time badly appreciated by users.
(some browsers can be fixed to disallow them)

Today the displaying of big image in same window is the way.
(if javascript is enabled)
(if not, the big image is displayed in same window and the user has to
click the back button of is navigator to come back to the gallery)

<a href="big_image.jpg" onclick="return pop(this)">
<img src="small_image" alt="thumbnail" title="venus">
</a>
JS :
====
var IE=false; /*@cc_on IE=true; @*/
function pop(what) {
var v = document.getElementById('viewer');
v.src = what.href;
v.style.display = 'block';
if(IE) {
var top = document.body.scrollTop ||
document.documentElement.scrollTop;
v.style.top = +top +10 + 'px';
}
return false;
}

CSS :
=====
#viewer { position: fixed; top: 10px; right: 20px; padding: 10px;
background: #999; border: 5px outset gold; display: none;
cursor: pointer;
/* hack IE */ _cursor: hand; _position: absolute;
}

HTML :
======
<img src="" id="viewer" alt="" onclick="this.style.display='none';"
title"click to close me">
</body>
--
sm
Oct 17 '08 #8

P: n/a
The code you specified does not work though. please show it in HTML page.

Santander
-------------

"SAM" <st*********************@wanadoo.fr.invalidwrote in message
news:48*********************@news.orange.fr...
Le 10/14/08 6:10 PM, Santander a écrit :
>both looks nice, not not too practical. The 1st sample takes a time when
load/adjust window, plus add this Vista "black background" effect,
whereas the regular javascript popup works faster - just open on click
and close on click. 2nd one show preview on mouseover. What I meant is
simple popup that opens on click on closes on click.

The second works too with onclick
(probably not with IE < 8)

You asked the best ways, no ?
They are.

Popups are most of the time badly appreciated by users.
(some browsers can be fixed to disallow them)

Today the displaying of big image in same window is the way.
(if javascript is enabled)
(if not, the big image is displayed in same window and the user has to
click the back button of is navigator to come back to the gallery)

<a href="big_image.jpg" onclick="return pop(this)">
<img src="small_image" alt="thumbnail" title="venus">
</a>
JS :
====
var IE=false; /*@cc_on IE=true; @*/
function pop(what) {
var v = document.getElementById('viewer');
v.src = what.href;
v.style.display = 'block';
if(IE) {
var top = document.body.scrollTop ||
document.documentElement.scrollTop;
v.style.top = +top +10 + 'px';
}
return false;
}

CSS :
=====
#viewer { position: fixed; top: 10px; right: 20px; padding: 10px;
background: #999; border: 5px outset gold; display: none;
cursor: pointer;
/* hack IE */ _cursor: hand; _position: absolute;
}

HTML :
======
<img src="" id="viewer" alt="" onclick="this.style.display='none';"
title"click to close me">
</body>
--
sm
Oct 20 '08 #9

P: n/a
Santander wrote:
there are many versions of JavaScipt image popups exist which show image
preview when we click on a thumbnail image to view a larger version.
What is the best way?
This site links tnails to large pictures, 100% HTML, 0% javascript:
http://www.monksvillephotograhs.org .
Oct 20 '08 #10

P: n/a
SAM
Le 10/20/08 3:21 PM, Santander a écrit :
The code you specified does not work though.
except if typo it has to run
(tested IE6 and Fx.3)
please show it in HTML page.
<http://cjoint.com/?kutwNZYx3z>
--
sm

Oct 20 '08 #12

P: n/a
SAM
Le 10/20/08 6:53 PM, Ma************@gmail.com a crit :
Oops. Try:

http://www.monksvillephotographs.org/
weight of the page : 2841 KB
Oct 20 '08 #13

P: n/a
some details about viewer css:

#viewer { position: fixed; top: 10px; right: 20px;
padding: 10px; cursor: pointer;
background: #999; border: 5px outset gold; display: none;
_position: absolute; _cursor: hand;
}
div { height: 300px; margin-top: 20px; }
div img { width: 200px }

Thumbnails size controlled by this code?
div { height: 300px; margin-top: 20px; }
div img { width: 200px }

do this line goes right before the closing </bodytag?
<img src="" id="viewer" alt="" onclick="this.style.display='none';"
title"click to close me">

Santander
------

"SAM" <st*********************@wanadoo.fr.invalidwrote in message
news:48*********************@news.orange.fr...
Le 10/20/08 3:21 PM, Santander a écrit :
>The code you specified does not work though.

except if typo it has to run
(tested IE6 and Fx.3)
>please show it in HTML page.

<http://cjoint.com/?kutwNZYx3z>
--
sm
Oct 21 '08 #14

This discussion thread is closed

Replies have been disabled for this discussion.