Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Make Thumbnail Link Open Image To A New Page


  • Please log in to reply
4 replies to this topic

#1 rigel

rigel

    FD-BC


  • BC Advisor
  • 12,944 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:South Carolina - USA
  • Local time:09:23 PM

Posted 20 May 2008 - 03:06 PM

<a href="soc010.jpg"><img border="2" src="soc010_small.jpg" width="120" height="88" xthumbnail-orig-image="soc010.jpg">

That is the code that FrontPage creates with an auto-thumbnail command. I understand how that works. What do I need to add to make the browser open a new window when the thumbnail is clicked? I want the existing page to remain open behind the new window. When the visitor finishes viewing the picture, he closes the window.

Other thoughs...

Is that the best way to handle someone viewing pictures? Is it better to let them "forward" the page to that image, and then make them use the back button to select the next picture? (My personal preference is to have the new window open - and then close it by pressing the X) Should I be thinking javascript?

Can you define a size of the window that opens? Can I get a 400 X 300 window open instead of an 800 X 600?

Thanks!

"In a world where you can be anything, be yourself." ~ unknown

"Fall in love with someone who deserves your heart. Not someone who plays with it. Will Smith


BC AdBot (Login to Remove)

 


m

#2 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:07:23 PM

Posted 20 May 2008 - 04:28 PM

Yes, maybe, and yes...

In order to have the image open in a new window, you just need to set the target:
target="_blank"
So your code would be
<a href="someimage.jpg" target="_blank">

If you want to define the size of the window that opens, you need Javascript.... at least I don't know of any way to do it in html. Here is a bit of code that nicked from somewhere:
<a href="someimage.jpg" onclick="window.open(this.href,'window','width=300,height=400,resizable,scrollbars,toolbar,menubar');return false;">
This will open the image in a window that is 300X400, as long as javascript is enabled. Otherwise it will be ignored and just open the image in the main window. This method triggers pop-up blockers, so that may be problematic.

It is hard to say what is the right way and the wrong way. I use a different method for popups that avoids pop-up blockers, but I do not think that is going to be an option for you, unless you are using some sort of server-side scripting. A bit of PHP would do nicely.

#3 rigel

rigel

    FD-BC

  • Topic Starter

  • BC Advisor
  • 12,944 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:South Carolina - USA
  • Local time:09:23 PM

Posted 20 May 2008 - 06:08 PM

I read up on PHP, but am not ready for that. I still have miles to go with html first.

So, if I understand correctly, this code should work when my thumbnail is clicked.
<a href="soc010.jpg" target="_blank"><img border="2" src="soc010_small.jpg" width="120" height="88" xthumbnail-orig-image="soc010.jpg">

No worries with pop-up blocking. If I can get a clean window open, I and the lady I help, will be happy :thumbsup:

Thanks again groovicus

"In a world where you can be anything, be yourself." ~ unknown

"Fall in love with someone who deserves your heart. Not someone who plays with it. Will Smith


#4 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:07:23 PM

Posted 20 May 2008 - 07:56 PM

Correct. But only the image will be sized, and not the page..at least it shouldn't.

#5 rigel

rigel

    FD-BC

  • Topic Starter

  • BC Advisor
  • 12,944 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:South Carolina - USA
  • Local time:09:23 PM

Posted 20 May 2008 - 08:08 PM

It soc010.jpg is the regular picture - this is where the anchor sends it? soc010_small.jpg is a sized thumbnail Frontpage created for me.

So, it should go to the full sized picture. Right?

"In a world where you can be anything, be yourself." ~ unknown

"Fall in love with someone who deserves your heart. Not someone who plays with it. Will Smith





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users