- Posts: 44
- Thank you received: 0
Hi,
I have been using TableJX for a couple of months now and and find it great for displaying information from my mysql tables.
I would like to start including images in my grid but am not sure how to achieve this. I have trawled the internet for solutions and only really discovered that the image should reside in a directory on the server and use a table containing the path and file name to point to the image.
I can create a table containing pointers to my images and link that in a view with my other tables.
My database contains information about people and I have between 0 and 5 images to be linked to any one person.
At this point I become stuck. Can anyone help me to achieve my goals of:
1. Displaying an image in the grid based on the path and filename?
2. Ideally I would like to display a thumbnail and expand this is the user clicks on it. I use multithumb on my site for image control and thumbnails but I'm not clear how this would interact.
3. How best to manage the variable number of images per person. Presumably the view could look like this:
Surname1 Initials1 ImageX
Surname2 Initials2
Surname3 Initials3 ImageY
Surname3 Initials3 ImageZ
If so, would this mean I would have a duplicate biography each time there is an associated image? Is there any way I can manipulate the information to give me:
Surname1 Initials1 ImageX
Surname2 Initials2
Surname3 Initials3 ImageY ImageZ
With thanks for any help or suggestions.
David
Please Log in or Create an account to join the conversation.
Hi,
1. You can insert html tag:
<img src="link_to_your_image" />
<a href="http://www.quackit.com/pix/worlds_largest_rabbit_2.jpg" target="_blank">
<img src="http://www.quackit.com/pix/worlds_largest_rabbit_2_t.jpg" width="100" height="131" border="0" alt="Photo of a big bunny rabbit!" />
</a>
Please Log in or Create an account to join the conversation.
Viljem,
Thank you for your help. I am still having problems so can you help me a little further please?
I have define a new table with two fields.
Record 1, field 1 contains:
<a href="www.my site .. image.jpg" target="_blank"> www.mysite .. image.jpg" width="100" height="131" border="0" alt="Image"/>
Record 1, field 2 is defined as a blob and I have uploaded a small jpg to it.
When I display this record in a grid, the results are:
Field 1 - displays 'Image'
Field 2 - displays the characters that make up the image (some 200 lines x 100 characters).
Can you tell me how to display the actual image in the grid please?
Thank you
David
Please Log in or Create an account to join the conversation.
Viljem,
I investigated this a little further and found the problem with the first picture was that I had in the code image.jpg whereas the picture was called IMAGE.jpg. Correcting the name allowed the picture to display in the grid and opened in a new window when it was clicked on.
Using this method, should I enter all my pictures using the syntax in the table field of:
<a href="www.mysite .. image.jpg" target="_blank"> www.mysite .. image.jpg" width="100" height="131" border="0" alt="Picture name" />
With regard to the second issue, do you know why the blob would not display as an image? Presumably there's nothing to convert the binary to the image?
Thank you
David
Please Log in or Create an account to join the conversation.
viljem wrote:
Please Log in or Create an account to join the conversation.