Stupid A HREF question

D

Diamondback

I've got a thumbnail image that, when clicked, opens a window containing a
larger image. I'd like to strip out all the buttons and menus and link bars
so that it's just the window wrapped around the picture. Can I do this with
straight HTML, or do I need to invoke some Javascript?
 
M

Michael Wilcox

Diamondback said:
I've got a thumbnail image that, when clicked, opens a window
containing a larger image. I'd like to strip out all the buttons and
menus and link bars so that it's just the window wrapped around the
picture.

This can be done with JavaScript, but please don't. Just link to the image
and leave everything else to the user.
 
D

David Dorward

Diamondback said:
I've got a thumbnail image that, when clicked, opens a window containing
a larger image. I'd like to strip out all the buttons and menus and link
bars so that it's just the window wrapped around the picture. Can I do
this with straight HTML, or do I need to invoke some Javascript?

You need some JavaScript, but please don't. New windows are a pain, you can
do some rather cool stuff without it.

A couple of good examples of thumbnail galleries which don't involve new
windows can be found at <http://www.picdiary.com/> and
<http://butterflies.bruciesusenetshit.info/>

That said, you could look at
<http://www.allmyfaqs.com/faq.pl?Console_window> (but please don't)
 
R

Richard

Diamondback said:
I've got a thumbnail image that, when clicked, opens a window containing
a larger image. I'd like to strip out all the buttons and menus and link
bars so that it's just the window wrapped around the picture. Can I do
this with straight HTML, or do I need to invoke some Javascript?

I do mine with a simple mouse over technique.
Granted JS needs to be implemented, but it beats a new window.

<a href ="#" onmouseover="document.images[0]='newpic.jpg' "> <img
src="oldpic.jpg"></a>

Preload your images into the array "images". [0] is your starting point. The
mouseover replaces [0] with the newpic.
onmouseout restores the oldpic to [0] if desired.
Place [0] anywhere you want it.

Of course brucie will give a 10k word dissertation as to why this is not
good, but it works.
Another 10k word dissertation on why not to use JS at all.
 
S

Steve R.

Diamondback wrote in message ...
I'd like to strip out all the buttons and menus and link bars
so that it's just the window wrapped around the picture.

Exactly the same question was asked on 'alt.html.tags' newsgroup yesterday
and there's some answers provided there. No point in me repeating them, so
take a look at the message headed "How do you open image in its own window
properly?"

Steve.
 
H

Hywel Jenkins

Diamondback said:
I've got a thumbnail image that, when clicked, opens a window containing
a larger image. I'd like to strip out all the buttons and menus and link
bars so that it's just the window wrapped around the picture. Can I do
this with straight HTML, or do I need to invoke some Javascript?

I do mine with a simple mouse over technique.
Granted JS needs to be implemented, but it beats a new window.

<a href ="#" onmouseover="document.images[0]='newpic.jpg' "> <img
src="oldpic.jpg"></a>

Did you actually read the OP's question? Where did he ask about doing a
mouseover image swap?
 
H

Hywel Jenkins

I've got a thumbnail image that, when clicked, opens a window containing a
larger image. I'd like to strip out all the buttons and menus and link bars
so that it's just the window wrapped around the picture. Can I do this with
straight HTML, or do I need to invoke some Javascript?

window.open("myimage.jpg","ImageWindow","height=300,width=300");
 
R

Richard

Hywel said:
Diamondback said:
I've got a thumbnail image that, when clicked, opens a window
containing a larger image. I'd like to strip out all the buttons and
menus and link bars so that it's just the window wrapped around the
picture. Can I do this with straight HTML, or do I need to invoke
some Javascript?

I do mine with a simple mouse over technique.
Granted JS needs to be implemented, but it beats a new window.

<a href ="#" onmouseover="document.images[0]='newpic.jpg' "> <img
src="oldpic.jpg"></a>
Did you actually read the OP's question? Where did he ask about doing a
mouseover image swap?

Did you read my reply?
Since it has already been stated JS is required, no sense in repeating that.
I offered this simple technique as one possible way of viewing images
without the need of an annoying popup window.
Since many browsers today have the capability to turn those off, why use it?
There are other ways to achieve the end result without using an annoying
popup.
I offered one possible way.
 
B

Beauregard T. Shagnasty

Quoth the raven named Richard:
Diamondback said:
I've got a thumbnail image that, when clicked, opens a window containing
a larger image. I'd like to strip out all the buttons and menus and link
bars so that it's just the window wrapped around the picture. Can I do
this with straight HTML, or do I need to invoke some Javascript?

I do mine with a simple mouse over technique.
Granted JS needs to be implemented, but it beats a new window.

<a href ="#" onmouseover="document.images[0]='newpic.jpg' "> <img
src="oldpic.jpg"></a>

Preload your images into the array "images". [0] is your starting point. The
mouseover replaces [0] with the newpic.
onmouseout restores the oldpic to [0] if desired.
Place [0] anywhere you want it.

I have never understood the need for preloading images that go with
thumbs.

What if I have 20 little thumbs linking to 20 large images, maybe
50-100KB each. Are you saying that it is wise to penalize a visitor by
downloading, um... (20 x ~75KB...) a LOT of data when they might want
to see only one or two?
Of course brucie will give a 10k word dissertation as to why this is not
good, but it works.

Doesn't take 10Kword. Dumb idea. Lots of things "work" but are
surely impractical.
 
A

Andrew Cameron

Richard said:
Diamondback said:
I've got a thumbnail image that, when clicked, opens a window
containing > a larger image. I'd like to strip out all the buttons
and menus and link > bars so that it's just the window wrapped
around the picture. Can I do > this with straight HTML, or do I
need to invoke some Javascript?

I do mine with a simple mouse over technique.
Granted JS needs to be implemented, but it beats a new window.

<a href ="#" onmouseover="document.images[0]='newpic.jpg' "> <img
src="oldpic.jpg"></a>

Preload your images into the array "images". [0] is your starting
point. The mouseover replaces [0] with the newpic.
onmouseout restores the oldpic to [0] if desired.
Place [0] anywhere you want it.

Of course brucie will give a 10k word dissertation as to why this is
not good, but it works.
Another 10k word dissertation on why not to use JS at all.

You really are an utter tosswit, aren't you?

Imbecile.
 
H

Hywel Jenkins

Hywel said:
Diamondback wrote:

I've got a thumbnail image that, when clicked, opens a window
containing a larger image. I'd like to strip out all the buttons and
menus and link bars so that it's just the window wrapped around the
picture. Can I do this with straight HTML, or do I need to invoke
some Javascript?

I do mine with a simple mouse over technique.
Granted JS needs to be implemented, but it beats a new window.

<a href ="#" onmouseover="document.images[0]='newpic.jpg' "> <img
src="oldpic.jpg"></a>
Did you actually read the OP's question? Where did he ask about doing a
mouseover image swap?

Did you read my reply?

Yes. You didn't answer the question in a manner that even remotely
hinted that you read and understood the original question.
 
B

brucie

I do mine with a simple mouse over technique.
Granted JS needs to be implemented, but it beats a new window.

<a href ="#" onmouseover="document.images[0]='newpic.jpg' "> <img
src="oldpic.jpg"></a>

Preload your images into the array "images". [0] is your starting point. The
mouseover replaces [0] with the newpic.
onmouseout restores the oldpic to [0] if desired.
Place [0] anywhere you want it.

Of course brucie will give a 10k word dissertation as to why this is not
good, but it works.

its a stupid idea. it can be done without any javascript. - 57 bytes
Another 10k word dissertation on why not to use JS at all.

theres no point introducing a potential point of failure where none need
exist.- 78 bytes

that leaves me 20,345 bytes free. i'll just use 277 bytes now and save
the rest for latter.

ass, blockhead, boob, booby, cretin, dimwit, donkey, dork, dumb ox,
dumbbell, dunce, dunderhead, fool, halfwit, ignoramus, imbecile,
jackass, jerk, kook, meathead, mental defective, moron, nincompoop,
ninny, nitwit, pinhead, pointy head, simpleton, stupid, tomfool, twit,
yo-yo
 
R

Richard

brucie said:
in post <Richard said:
I do mine with a simple mouse over technique.
Granted JS needs to be implemented, but it beats a new window.

<a href ="#" onmouseover="document.images[0]='newpic.jpg' "> <img
src="oldpic.jpg"></a>

Preload your images into the array "images". [0] is your starting point.
The mouseover replaces [0] with the newpic. onmouseout restores the
oldpic to [0] if desired. Place [0] anywhere you want it. Of course
brucie will give a 10k word dissertation as to why this is not good, but
it works.
its a stupid idea. it can be done without any javascript. - 57 bytes

So point me to where to it can be done the way you say oh mister expert know
it all.
 
R

rf

Richard said:
Diamondback said:
I've got a thumbnail image that, when clicked, opens a window containing
a larger image. I'd like to strip out all the buttons and menus and link
bars so that it's just the window wrapped around the picture. Can I do
this with straight HTML, or do I need to invoke some Javascript?

I do mine with a simple mouse over technique.
Granted JS needs to be implemented, but it beats a new window.

<a href ="#" onmouseover="document.images[0]='newpic.jpg' "> <img
src="oldpic.jpg"></a>

Preload your images into the array "images".

This means that your entire portfolio of images is downloaded even if the
viewer only wants to look at a couple of them. Hundreds of kilobytes I'd
suspect.

This is Not a good thing to do.


Cheers
Richard.
 
B

brucie

So point me to where to it can be done the way you say oh mister expert know
it all.

no. because:

1. you asked.
2. i'm much more interested in how high you blood pressure can go before
your cute little head pops. it would be nice of you if you could capture
the event on webcam.
 
D

Diamondback

The examples you gave aren't really the effewct I wanted, but the final link
was quite helpful. FWIW, I don't have an array of images for readers to
peruse. This is connected to a CF app and each database record has just one
image (albeit a large one). The thumbnail offers them a glimpse of that
single image, and if the user wants to see it in more detail they can click
it. It's done now with a simple A HREF, but the menu bar and links, el al,
seem extraneous because all that's there is the image.

Thanks for your help.
 
N

nice.guy.nige

I've got a thumbnail image that, when clicked, opens a window
containing a larger image. I'd like to strip out all the buttons and
menus and link bars so that it's just the window wrapped around the
picture. Can I do this with straight HTML, or do I need to invoke
some Javascript?

http://allmyfaqs.com/faq.pl?Console_window

But read the other replies about why it is considered a bad a idea to open
new windows.

Cheers,
Nige

--
Nigel Moss.

Email address is not valid. (e-mail address removed). Take the dog out!
http://www.nigenet.org.uk | Boycott E$$O!! http://www.stopesso.com
In the land of the blind, the one-eyed man is very, very busy!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top