Old 13-08-2006, 18:33   #1 (permalink)
bender
I'd hit it
 
bender's Avatar
 
Join Date: Jun 2006
Location: Helsinki
Posts: 369
Slight popups problem

I have a small problem. I installed this gallery script on my page that automagically generates an image gallery from a folder of images. You just place the script in a folder with images and it generates the thumbnails on the fly etc.

But currently the pictures open in small popups. I would like to just have the picture open in the same browser window, as if you typed in the path to the image in your browser. Am I being confusing?

Here's the relevant code that creates the thumbnail link of the image:
Quote:
echo "<center><a href=# onclick=\"javascript:window.open('$aPath$aFn', '_blank', 'width=$w, height=$h, scrollbars=$sb');return false\"><img border=\"0\" width=\"$twidth\" height=\"$theight\" src=\"genthumbs.php?image=$fullpath&w=$twidth\"></img></a></center>";

I'd like to get rid of the window:pen part and just leave the path to the image there. Can anyone help me?


Edit: Nevermind the stupid smiley in the middle.
  Reply With Quote
Old 14-08-2006, 06:53   #2 (permalink)
MikeMackay
Everything is fine.
 
MikeMackay's Avatar
 
Join Date: Feb 2005
Location: Witham & London
Posts: 774
Send a message via MSN to MikeMackay Send a message via Skype™ to MikeMackay
Perhaps...

Code:
echo "<center><a href=\"$aPath$aFn\"><img border=\"0\" width=\"$twidth\" height=\"$theight\" src=\"genthumbs.php?image=$fullpath&w=$twidth\"></img></a></center>";

OR

Code:
echo "<center><a href=\"$fullpath\"><img border=\"0\" width=\"$twidth\" height=\"$theight\" src=\"genthumbs.php?image=$fullpath&w=$twidth\"></img></a></center>";

- Mike
  Reply With Quote
Old 14-08-2006, 10:00   #3 (permalink)
bender
I'd hit it
 
bender's Avatar
 
Join Date: Jun 2006
Location: Helsinki
Posts: 369
Thanks, works perfectly.

One more thing though. Would it be possible to make the fullsize image clickable to go back.
I saw something like javascript:history.back() being used on one site that did the trick. How could that be implemented here?
  Reply With Quote
Old 14-08-2006, 10:20   #4 (permalink)
MikeMackay
Everything is fine.
 
MikeMackay's Avatar
 
Join Date: Feb 2005
Location: Witham & London
Posts: 774
Send a message via MSN to MikeMackay Send a message via Skype™ to MikeMackay
Quote:
Originally Posted by bender
Thanks, works perfectly.

One more thing though. Would it be possible to make the fullsize image clickable to go back.
I saw something like javascript:history.back() being used on one site that did the trick. How could that be implemented here?
That could only be implemented if you are displaying the image in an HTML page and not on it's own. Without being in an HTML page you cannot add JavaScript functionality to an element.

- Mike
  Reply With Quote
Old 14-08-2006, 15:59   #5 (permalink)
bender
I'd hit it
 
bender's Avatar
 
Join Date: Jun 2006
Location: Helsinki
Posts: 369
Yeah, well it's good enough.
Thanks for your help. I really appreciate it.
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8