Current location: Hot Scripts Forums » General Web Coding » JavaScript » Thumbnails to autosized windows


Thumbnails to autosized windows

Reply
  #1 (permalink)  
Old 10-14-03, 09:18 AM
brittonc brittonc is offline
Newbie Coder
 
Join Date: Oct 2003
Location: Bristol, UK
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Thumbnails to autosized windows

I am new to web creation and have NO programming experience but have a site which contains a few images per page. I currently have these as thumbnails but when they are clicked on I just get the usual Explorer window with gaps all around the edge. It look tatty. What I want to be able to do is click on an image and have it pop up in a window that resizes to the image. Anyone know how to do this?
Reply With Quote
  #2 (permalink)  
Old 10-15-03, 02:39 PM
eddyvlad eddyvlad is offline
Wannabe Coder
 
Join Date: Sep 2003
Location: In The Bloody Pits Of Hell
Posts: 160
Thanks: 2
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by brittonc
I am new to web creation and have NO programming experience but have a site which contains a few images per page. I currently have these as thumbnails but when they are clicked on I just get the usual Explorer window with gaps all around the edge. It look tatty. What I want to be able to do is click on an image and have it pop up in a window that resizes to the image. Anyone know how to do this?
You mean like this...
http://www.codelifter.com/main/javas...magepopup.html
Reply With Quote
  #3 (permalink)  
Old 10-21-03, 09:48 AM
brittonc brittonc is offline
Newbie Coder
 
Join Date: Oct 2003
Location: Bristol, UK
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
I gave this a go but can't seem to get it to work. I replaced the http:/ path with my local PC path as this is what I am using to test the web site before having it hosted. Does this make a difference?
Reply With Quote
  #4 (permalink)  
Old 10-22-03, 09:44 AM
Luke Skywalker Luke Skywalker is offline
Newbie Coder
 
Join Date: Jun 2003
Location: Switzerland
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Hi,

I have written a little HTML-Page including a script that should satisfy you needs (see attached zip-file). Just replace the "title for window", "picture.jpg" , "thumbnail.jpg" in the link by your values.

Cheers Luke
Attached Files
File Type: zip autosize_window.zip (1.5 KB, 210 views)

Last edited by Luke Skywalker; 10-22-03 at 09:52 AM.
Reply With Quote
  #5 (permalink)  
Old 10-23-03, 03:52 AM
brittonc brittonc is offline
Newbie Coder
 
Join Date: Oct 2003
Location: Bristol, UK
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Luke,

I have put the code into my web page and have changed the original code as below to your code.

<a href="LBH%20gardens.jpg" target="_blank"><img border="2" src="lbhgardens_s_small.jpg" alt="Little Bridge House" width="200" height="131"></a></font></p>

<a href="javascript:show_big_pic('Little Bridge House gardens','LBH%20gardens.jpg)" src="lbhgardens_s_small.jpg" border=0></a>&nbsp;

I have now lost the thumbnailed image I had on the page. What did I do wrong? Does it make a difference if the images are in a table?
Reply With Quote
  #6 (permalink)  
Old 10-23-03, 04:23 AM
brittonc brittonc is offline
Newbie Coder
 
Join Date: Oct 2003
Location: Bristol, UK
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Found the problem. I missed a bit of code! I now have my thumbnail back but when I click on it I get a pop up window but no image. Any ideas??
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP - Windows Authentication link Mista Script Requests 3 12-29-03 06:09 PM
Windows or Linux? webscript Polls 15 10-05-03 03:07 PM
windows to linux platform vioss PHP 4 08-29-03 06:24 PM
Generating thumbnails: to save or show only? borgo PHP 1 08-12-03 09:38 AM
Windows 2000 Hosting with ASP.NET & MS SQL - $6.99/mo JodoHost General Advertisements 0 06-15-03 10:08 AM


All times are GMT -5. The time now is 11:08 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.