Page 1 of 1

Image Download

Posted: Thu Jan 13, 2011 3:12 pm
by bsouthuk
Hi - wonder is someone out there can help me

I want my users to be able to select from a list field then click on a button for it to display an image on on the card. The image that is displayed will depend on the image they select from the list field.

I'm struggling to find a way of doing this - I want my images to be stored on my server as there are so many so if you have any ideas I would most appreciate it.

Thanks

Daniel

Re: Image Download

Posted: Thu Jan 13, 2011 3:22 pm
by Klaus
Hi Daniel,

since you can set the filename of an image to any valid internet URL, this should be prety easy!

This scripts presumes that the (bare) filenames of the images are in that listfield like "nice_image.jpg":

Code: Select all

on mouseup
  put the selectedtext of fld "listfield with imagenames" into tSel
  if tSel = empty then
    exit mouseup
  end if
  set the filename of img "your image for display here" to ("http://www.yourserverhere.com/folderwithimages/" & tSel)
end mouseup
Hope that helps.


Best

Klaus

Re: Image Download

Posted: Thu Jan 13, 2011 5:46 pm
by bsouthuk
Thats great, works perfectly - thanks Klaus!