By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,625 Members | 1,636 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,625 IT Pros & Developers. It's quick & easy.

thickbox gallery image is not working

P: 245
Hey all,
I have integrated Thickbox Gallery images for multiple images. So that once a member/client/visitor view the images he/she can navigate easily.

It just do not show any image if i used it's property rel means same rel element and value. It does not work. Can some body view on my script and tell me what is the problem behind this issue.
here is the live demo of the my work

Go to this link

Then click on Start Finding button. Once the page will open it show only one record. Click on Dealer Enquiry Link or click on images. it will take to you on the detail page. There you will see the pictures list and here i integrated Thickbox image gallery. when you will click on thumbnail then you will get my problem that it loads nothing just keep on browsing the page n that's it

kindly solve my problem Sir.

kind regards,
Mohsin Rafique
Jun 15 '09 #1
Share this Question
Share on Google+
12 Replies

Expert Mod 15k+
P: 16,027
Have you followed the instructions exactly as described here and with the latest version?
Jun 15 '09 #2

P: 245
Yes i did. there is not even a single line change in it
Jun 16 '09 #3

Expert Mod 15k+
P: 16,027
Well, the src of the image and the link href attribute don't match. Try making sure they match.
Jun 16 '09 #4

P: 245
Sir it does not matter as my same script is running on my another project and it is working there.
here is the URL of that other website

Same script is working there. My href and image src points to the same image.

If i exclude the property of rel in my website then thickbox works fine on
this URL

But when i used property rel it does not work.

and my href and src image points to same image source. I checked that too

Here is my code

Expand|Select|Wrap|Line Numbers
  1. <table cellspacing="0" cellpadding="0" border="0" align="left" width="727">
  2.                                             <tr>
  3.                                                 <td align="left" valign="top" width="400">
  4.                                                     <?
  5.                                                     if(!empty($photo_info['photo_1']) && file_exists($photo_info['photo_1'])) {$img[0]=$photo_info['photo_1'];}                                
  6.                                                     if(!empty($photo_info['photo_2']) && file_exists($photo_info['photo_2'])) {$img[1]=$photo_info['photo_2'];}
  7.                                                     if(!empty($photo_info['photo_3']) && file_exists($photo_info['photo_3'])) {$img[2]=$photo_info['photo_3'];}
  8.                                                     if(!empty($photo_info['photo_4']) && file_exists($photo_info['photo_4'])) {$img[3]=$photo_info['photo_4'];}
  9.                                                     if(!empty($photo_info['photo_5']) && file_exists($photo_info['photo_5'])) {$img[4]=$photo_info['photo_5'];}
  10.                                                     if(!empty($photo_info['photo_6']) && file_exists($photo_info['photo_6'])) {$img[5]=$photo_info['photo_6'];}
  11.                                                     if(!empty($photo_info['photo_7']) && file_exists($photo_info['photo_7'])) {$img[6]=$photo_info['photo_7'];}
  12.                                                     if(!empty($photo_info['photo_8']) && file_exists($photo_info['photo_8'])) {$img[7]=$photo_info['photo_8'];}
  13.                                                     if($photo_info['photo_1']!=""){echo "<a href=\"$img[0]\" class=\"thickbox\" title=\"$year_name&nbsp;$make_name&nbsp;$model_name\"><img src='thumb.php?file=".$photo_info['photo_1']."&sizex=390&sizey=294' border='0' alt='' /></a>";}
  14.                                                     ?>
  15.                                                 </td>
  16.                                                 <td align="right" valign="top" width="327">
  17.                                                     <table cellspacing="0" cellpadding="0" border="0" align="right">
  18.                                                         <tr>
  19.                                                             <?
  20.                                                             $countImg=0;
  21.                                                             for($i=0; $i<sizeof($img); $i++){
  22.                                                                 $countImg++;
  23.                                                                 echo "<td><a href=\"$img[$i]\" title=\"$year_name&nbsp;$make_name&nbsp;$model_name\" class=\"thickbox\" rel=\"gallerycars[]\"><img src=\"thumb.php?file=$img[$i]&sizex=105&sizey=88\" border=\"0\" alt=\"$year_name&nbsp;$make_name&nbsp;$model_name\" /></a></td>";    
  24.                                                                 if($countImg%3!=0){
  25.                                                                     echo "<td width='10'></td>";
  26.                                                                 }
  27.                                                                 if($countImg%3==0){
  28.                                                                     echo "</tr><tr><td class='tdheight_10'></td></tr><tr>";    
  29.                                                                 }
  30.                                                             }
  31.                                                             ?>
  32.                                                         </tr>
  33.                                                     </table>
  34.                                                 </td>
  35.                                             </tr>
  36.                                         </table>
Jun 16 '09 #5

Expert Mod 15k+
P: 16,027
I don't know if this would make a difference, but try setting rel to the same as you've used in the working one, i.e. "gallery-cars" instead of "gallerycars[]".
Jun 16 '09 #6

P: 245
Even then it's not working sir. I amazed why it is not working:(...!
Jun 16 '09 #7

Expert Mod 15k+
P: 16,027
Although you say it points to the same image source, one is the actual image while the other is a PHP file which generates a thumb of the image. Why not use the same image, but set the width/height of img element?
Jun 16 '09 #8

P: 245
Sir even then it's not work. If this is the problem then it never works with my other website as i already gave you the link but you can see that other website too

There it is working fine.
Jun 16 '09 #9

Expert Mod 15k+
P: 16,027
Take the working code and use that in the test page.

It may be that it is working, but it's taking a long time for the image to load.
Jun 16 '09 #10

P: 2
I've had exactly the same problem. I have thick box working perfectly but if I put the same relative attribute for a group, as per the example, then it stops working.

I've seen this a couple of times before. I think there may be some ambiguity in how you implement it. If I find out what's happening then I'll post back here.
Oct 20 '09 #11

P: 1
It seems the problem could be a compatability one in the new version of Thickbox. I spent quite a while hunting this solution down...

Its a simple removal of a @ and everything works again the way it should

Woohoo! :)
Oct 26 '09 #12

P: 2
Thanks Steve,

I ended up going back to the Thickbox website where they suggest alternatives to thickbox. I used colorbox in the end and this worked very well.


Oct 26 '09 #13

Post your reply

Sign in to post your reply or Sign up for a free account.