...

View Full Version : Title for an image popup



grubesteak
05-26-2005, 01:47 AM
So all you advanced scripters, I'm in need of some help.

I have this page with some JavaScript that opens up an image in a window when a thumbnail is clicked. How do I get the title to show up as something coherent instead of the file path?

Example: http://www.cynthiawhalen.com/test/prices.php

Thanks!

Eric

(p.s. I'm such a newbie to JS. Thanks for your help.)

glenngv
05-26-2005, 04:51 AM
http://www.codingforums.com/showthread.php?t=9836

grubesteak
05-26-2005, 06:38 AM
Hmm... not exactly newbie-friendly, but thanks.

glenngv
05-26-2005, 07:21 AM
You just put the working code (my modification - post#2 or Skyzyx's - post#13) inside a <script> tag in the <head>. Then in your thumbnails, call the script like this:


<a href="images/big1.jpg" onclick="popImg(this.href); return false;"><img src="images/thumb1.jpg" /></a>

<a href="images/big2.jpg" onclick="popImg(this.href); return false;"><img src="images/thumb2.jpg" /></a>

grubesteak
05-26-2005, 04:00 PM
Now that is helpful. You should get the most helpful member award. Oh wait ...

glenngv
05-27-2005, 04:49 AM
I can still win another one. ;)

grubesteak
05-27-2005, 09:58 PM
PM me and tell me what to do to get you closer to winning again. You've been a great help.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum