Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dispaly photo in a new window

Status
Not open for further replies.

quaked2023

Technical User
Jan 22, 2004
105
MX
hello:

I have a question, can you tell me how can i display a picture in another window?, i want to do something like this but i want to display the picture in a new window.... this is my first web page and i only know how to use html.. a friend told me that i need to use Java to do this, but i don't know how... please can you help me?

-The Only Privacy Left Is The Inside Of Your Head!- QUAKED2023
 
In the page you gave as an example, each image is simply a link to another website:
<a href="otherpage.html"><img src="otherimg.jpg"></a>

If you want the window to open in another window, you can use either of the following:

Anything but XHTML Strict:
<a href="otherpage.html" target="_blank"><img src="otherimg.jpg"></a>

XHTML Strict:
<a href="otherpage.html" onclick="window.open(this.href)"><img src="otherimg.jpg"></a>

To open the image alone, change [tt]otherpage.html[/tt] in the links to [tt]otherimg.jpg[/tt]

--Chessbot

"So it goes."
Kurt Vonnegut, Slaughterhouse Five
 
hey chessbot!

The Code you gave me works great it opens the picture in another window, but it also opens it in the original page... any ideas?

-The Only Privacy Left Is The Inside Of Your Head!- QUAKED2023
 
Sorry!
Here is the code again:
<a href="otherpage.html" onclick="window.open(this.href);return false;"><img src="otherimg.jpg"></a>


--Chessbot

"So it goes."
Kurt Vonnegut, Slaughterhouse Five
 
Thanks it works great.... here is another question, i want to put the picture not in a blank page, but in a page with a frame, i just have to put insead of "otherpage.html", the name of the page?, or the name of the image?

Thanks

-The Only Privacy Left Is The Inside Of Your Head!- QUAKED2023
 
What is the name of the frame?

Try this:
<a href="otherpage.html" target="framename"><img src="otherimg.jpg"></a>


--Chessbot

"So it goes."
Kurt Vonnegut, Slaughterhouse Five
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top