Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

what is the correct tag for displaying a graphic dynamically on the web


This topic is 8634 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

I have several jpegs that display on various layouts that I have created in my database. I simply created a container field on each of the layouts and made a reference to the images which are kept in an images folder...Now this all works just fine, but I can't seem to reference or display the files on my detail records or hitlist pages crazy.gif" border="0. What is the correct tag for getting lasso to call the graphic object from the database record so that it will display on the web page crazy.gif" border="0

  • Newbies
Posted

wink.gif" border="0 Thanks for the help, I really appreciate it...I got the web page to display the pictures in my images folder using the tag you showed me...But Now my question is how do I display the individual jpg's for each record in my database, some how I feel this should be possible, but I don't have the experience to figure it out yet...I was getting tutored by the resident FMP guru here at my school...But he's not here anymore. crazy.gif" border="0 For the most part, I just need a little nudge in the right direction for now. There are 39 records presently in my Database and each has a picture of a different lab here on campus...so a static picture just won't do, I really need to be able to call up each photo dynamically. As I stated before the jpg's are simply referenced to and are not embeded directly into the database file. So is there a tag that can be placed in the detail.html/hitlist.html file to complete this type of query to the database.

here is the url to my database so that you can see what it looks like:

http://coursepages.lbcc.cc.ca.us/saltweb

desperately seeking solutions crazy.gif" border="0

Posted

In my example above I am calling separate picture for each record; the field name is the name of picture.

You can have the .jpg in name field, or separately like in my example.

Posted

if your pictures are in your database, you can easily use the [FMP-Image: ContainerFieldNameHere] tag. Of course, people will now tell you how they think it is better to use static jpgs that a field calls as anatoli's first post does, then use a [FMP-Image:] tag mainly b/c of speed. And depending, they are sometimes right, but i think it's just easier to store the jpg in the database and call it with the appropriate CDML tag above. Of course, as with all fields, it will need to have a recID that it is calling. But this is no different from displaying any field, so that shouldn't be your issue.

Enjoy

jeremy

Posted

FM will handle that, no problem.

To store images in db has advantage that you can test if the picture is there and make decision on that.

The speed is also not really greater.

But what counts is TPS. If you store images in db, WebCompanion will use its power to do nothing for database, but it will spent time just transferring stream of 0/1 with picture.

Posted

I think I use the same with Anatoli while putting my images on the web.

I have an "images" directory. I keep my pictures in that directory. in a database I keep the name of the pictures. And I use those records to show my pictures:

<img src="images/[fmp-field:image_name].jpg">

it really keeps me away handling a huge database containing many many pictures.

keeping the photos of the 700 hundred students... the size of the database or folder is above 200 MB. Can you imagine working with such a database?..

Abkaplan

  • Newbies
Posted

Okay initially when I used Anatoli's code it did work...but it was a static picture that appeared in every record and not the individual pictures that are referenced by the container field (http://mysite.com/images/[fmp-field:image_name].jpg...

Now if I understand every one correctly, you are getting all of you pic's from the individual records to display as you go from one record to the next...and everyone keeps referring to the name of the picture, as what should be put in the [fmp-field:image_name].jpg field... Well All I get is a broken image icon. crazy.gif" border="0

My question is what is being stored in the database??? crazy.gif" border="0

Are you storing the pictures in the database?

Are you storing a reference to the images, that are being stored in the images folder? (btw this is how I'm doing it in my database.):

or are you storing the Text name of the file in the field in the database???

I know I may appear to be stupid about all this, but believe me I'm not...

Please be more specific as to what you are doing to make the tag work properly...I'm simply trying to learn how to do it right cool.gif" border="0

Posted

okay, either way you do it, each individual record will need respective, unique data. For the way that you are doing it, each record will have the link to the image in the Image_name Field.

If you are getting a broken link, you are probably doing everything right except you are assigning the wrong value to the image_name field. If it is set up like most "standard" sites (if there is a such thing), then the data in FM should read "images/picture1.jpg."

It looks by the last post that you wrote that you actually do understand what we are saying, so i'm assuming you are just getting your directory wrong.

A way to test this is to go to the page that you want the link to be on and actually put the actual image on the page. Preview it in your browser, look at the source and whatever the pic uses for the img src=, that is EXACTLY what you need to have in your database.

I'm sorry if all this is too obvious and this isn't your issue, but it really sounds like you understand what we are saying, but with the broken link, something in the [FMP-Field: image_name] isnt taking you to the right place. If you double check everything and it's still not working, be as specific as you can in your questioning. . .

BTW, i always include, the .jpg or .gif in my image_name field because sometimes you might use .jpg, or . gif. With it not in the field name, you will be limited to using .jpg.

Jeremy

Posted

okay, either way you do it, each individual record will need respective, unique data. For the way that you are doing it, each record will have the link to the image in the Image_name Field.

If you are getting a broken link, you are probably doing everything right except you are assigning the wrong value to the image_name field. If it is set up like most "standard" sites (if there is a such thing), then the data in FM should read "images/picture1.jpg."

It looks by the last post that you wrote that you actually do understand what we are saying, so i'm assuming you are just getting your directory wrong.

A way to test this is to go to the page that you want the link to be on and actually put the actual image on the page. Preview it in your browser, look at the source and whatever the pic uses for the img src=, that is EXACTLY what you need to have in your database.

I'm sorry if all this is too obvious and this isn't your issue, but it really sounds like you understand what we are saying, but with the broken link, something in the [FMP-Field: image_name] isnt taking you to the right place. If you double check everything and it's still not working, be as specific as you can in your questioning. . .

BTW, i always include, the .jpg or .gif in my image_name field because sometimes you might use .jpg, or . gif. With it not in the field name, you will be limited to using .jpg.

Jeremy

Posted

Computerbig;

I will explain more specifically what I have done:

c:/fp5/web/ ( here look at the files)

student.fp5

fileds:

student_name : mike , jhon, alice, ect..

student_number : 1010101 , 01010102, 01010103

student_class : A1 , A2, A3, ....

images ( in that folder there are those smile.gif" border="0

01010101.jpg

01010102.jpg

01010103.jpg

( these are the photos of my students and 01010101 is the student number of a student)

search.htm

student number :[fmp-field:student_number]

student name :[fmp-field:student_name]

student class :[fmp-field:student_name]

search_results.htm

student number student photo

[fmp-field:student_number] <img src="images/[fmp-field:student_number].jpg">

When you activate the form in your search.htm you will see in the web list

student number ... student photo

01010101 ... photo of the sudent in the "image" directory

That is one of the way to show the pictures on the web. Yo can also embed your pictures in to student.fp5 database into a picture field. that will also be easier. in that way you can use those codes :

<A HREF="[FMP-Image:field_name_here]">View the image!</A> (*)

or

<IMG SRC="[FMP-image: field_name_here]" WIDTH=50 HEIGHT=50 ALIGN=bottom> (*)

best wishes...

Abkaplan

*( codes taken from home page preferences.hlb)

  • Newbies
Posted

Well I would like to thank everyone for their interest and help! You people are amazing...really and truly awesome!!! your family's Kung Fu is the Best... I did finally get it to work and it displays my pic's perfectly from each record in the database. cool.gif" border="0

I simply changed the Image Container field that I had previously created in the database to a text field, and type in the names of all the picture files as you said I should and it work after a little tweaking of the tag code.

I have a new question now... I have several other pictures that need to be displayed on different web pages from the same database... is it possible to have more than one picture be displayed on one web page at the same time using the same CDML tags as before or will FM only allow one pictue field to be displayed as i am experiencing now.(I would think that it would'nt care considering that it would be a completely new field from the database.)

But once again I'm in broken icon heaven crazy.gif" border="0

any suggestions?:

This topic is 8634 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.