No announcement yet.

Use Image on URL field in Grid

  • Filter
  • Time
  • Show
Clear All
new posts

  • Use Image on URL field in Grid

    I have a text fields in a grid that is really a URL. I set it up as a URL and that works, but I really want to replace the link that shows the URL to an image, like a camera, but still have it clickable.
    Thanks in advance

  • #2
    I got part of it figured out. Just have one final problem left. I put this in the OnRecord

    {camera} = '<a href= "'.{videolink}.'" target="_blank" ><img src="_lib/img/camera.png" style="width:24px;height:24px;border:0"></a>';

    and added another field to the grid called camera.

    The only problem I'm having now is understanding how to get the src= to pick up the proper png file. I have uploaded the camera.png to _lib/img on my server, but it's not working.
    It also now doesn't work locally so I must be not understanding what the proper relative path for the images are.

    Close but not quite there.


    • #3
      So basically I just need to know where to put the image of a camera, and and how to reference that image in the img src above. Should be pretty simple I suspect, but haven't been able to figure it out yet. Tried quite a few things but haven't gotten it working yet


      • #4
        You could try to add in Apache configuration file an Alias to the folder where you have the images, ex: Alias "/myimagesalias" "yourfolder/yoursubfolder" <Directory ""yourfolder/yoursubfolder"> Require all granted </Directory>.
        After that in Scriptcase use a variable $img = "myimagesalias/yourPicture";


        • #5
          I ended up using "../_lib/img/camera.png" for the image source and that works. Thanks