https://antibiotiqueaugmentin.com/surdosage-augmentin-bebe/
× Welcome to the ToolsJX forum!


How to display multiple images in a grid?

  • djb
  • djb's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
13 years 9 months ago #669

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.

More
13 years 9 months ago #678

Hi,

1. You can insert html tag:

<img src="link_to_your_image" />

2. You can insert html tag image + link on image, that opens in a new window
<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>

3. It depends on your data model, everything is possible. The easiest way (if you have let's say limited max pictures to e.g. 4)
Name|Surname|Pic1|Pic2|Pic3|Pic4

If you don't know the number of max pictures, you can create view that can transpose records (vertical to horizontal), a little bit complicated solution

Best regards,
Viljem

Last edit: 13 years 9 months ago by user62.

Please Log in or Create an account to join the conversation.

  • djb
  • djb's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
13 years 9 months ago #685

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.

  • djb
  • djb's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
13 years 9 months ago #686

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.

More
13 years 1 month ago #996

viljem wrote:

Please Log in or Create an account to join the conversation.

Moderators: tomaz
Time to create page: 0.218 seconds

Contact Us

Contact us on Discord

Contact us on Facebook