[OT] Request for quick Javascript help...?

Dr Midnight

Explorer
Hey there-
I'm trying to put images up on my website that'll do that little launch thing. You know... click on a thumbnail, a new window launches just with the full image in it. How can I do that? Is it an easy thing where you can just tell me here, or is it one of those huge, hideous ordeals?

My thanks to all my gamerz
PEACE OUT DAWGG
 

log in or register to remove this ad

I'm trying to put images up on my website that'll do that little launch thing. You know... click on a thumbnail, a new window launches just with the full image in it. How can I do that? Is it an easy thing where you can just tell me here, or is it one of those huge, hideous ordeals?
You don't need JavaScript, Dr. Midnight; you just need to supply a target for the anchor tag.
Code:
[Color=White]
(Within angle brackets, of course)
a href="../images/myimage.jpg" target="myimagewindow"
[/Color]
 
Last edited:


Re: Re: [OT] Request for quick Javascript help...?

mmadsen said:

You don't need JavaScript, Dr. Midnight; you just need to supply a target for the anchor tag.
Code:
[Color=White]
(Within angle brackets, of course)
a href="../images/myimage.jpg" target="myimagewindow"
[/Color]

Excellent! Now, uh... target for the anchor tag??

I'm using Dreamweaver and am trying REALLY hard to figure this out myself, really I am, but I've been trying for hours and am not closer to anything. I know how to open a little html thing and enter the <> stuff, but I don't know how to put that into an image link, etc...

damn I feel childish.

EDIT: Thanks Mark!
 
Last edited:

In Dreamweaver, select your thumbnail, then in the Properties palette type the name of the image in the "Link" box (or drag the little target to the full-sized picture in your Site window), and then type whatever you want (say "myimagewindow") in the "Target" box. Or type "_new" in the "Target" box if you want a new window to be created every time one of your thumbnails is clicked (instead of reusing the new window).

Alternately in Dreamweaver, select your thumbnail and then in the Behaviors palette click on the "+" sign and choose "Open Browser Window". A dialog box will pop up that lets you give the new window dimensions, select whether various menus and buttons are available in the new browser window, and give the window a name. Dreamweaver will write all of the Javascript for you, and it's very neat and clean cross-platform Javascript.
 

In your anchor tag (angle brackets inverted so it'll display):

>a href="#" onCLick="javascript:window.open('URL','targetWindow','parameters')"<

among the parameters are such things as the height and width of the new window, what chrome is visible.

The list of parameters goes between a single quote set and are seperated by commas like so:
'height=value, width=value, toolbars=yes/no, scrollbars=yes/no'

you can also control the position of the top left corner of the window but if memory serves IE and Netscape use different parameters and I'll be buggered if I can remember what they are right now.

hope that helps

Tanager
 


Remove ads

Top