Jump to content

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

Recommended Posts

Posted

I was trying to refine my database and ran into some kind of blind spot that I hope someone can illuminate. In the detail view of a found record, there had been a thumbnail that was also a link to an optional larger view of the image. Original code:

<A HREF="[FMP-linkrecid: layout=dataentry, format=MMZWEB/MMZdetaillarge.html]" target="_blank">

<img src="[FMP-Field: photothumb]" border="0"></A>

But I wanted to try having some alternate text appear if there was no image, so I created the whole line through a calculation in the DB. (If photo name field is blank, code is replaced by "Image to come" text.) Then I got a message that "this program does not support the protocol for addressing . . . ." followed by the Linkrecid section, with the %20 for spaces.

So I tried the URL version based on my understanding of the CDML reference database.

<A HREF="FMPro?-db=MMZoo.fm&-format=MMZWEB/MMZdetaillarge.html&-lay=dataentry&-RecID=[FMP-CurrentRecID]&-Find" target=_blank><img src="MMZWEB/MMZ_artthumb/bogart.jpg" border="0"></A>

I feel like I'm SO CLOSE, but I'm missing something about the RecID link. If I remove it from the code above, I get a random larger image. If I leave it in, I get "The specified record was not found."

I'll be grateful for any ideas.

Ernie

Posted

Try

[FMP-If: PictureField .neq.]

Your picture img code here

[FMP-Else]

Your TXT here

[/FMP-If]

For this pictures must be in FM database, which is not the best way, but it works.

You can also use only reference to the picture (URL) in txt field and it will work the same way.

HTH

Posted

Great idea, Anatoli. Thank you! Just come at the problem from a slightly different angle.

The "photothumb" field in fact already was a URL. Someday I'll have to understand that RecId better, but in the meantime things are working.

Thanks again.

Ernie

Posted

the thubm approach...(if it applies).

I like to "mark" records as having image or not......this way user loads only 2 images vs. every thumb for every record:

------------------------------

[FMP-record]

[FMP-If: Image_field.eq.]

<img src="/images/imageNO.gif" width="18" height="18" border="0">

[FMP-Else]

<img src="/images/imageOK.gif" width="18" height="18" border="0">

[/FMP-If]

<a href="[FMP-LinkRecID: format=ResultDetail.html, layout=web]">

[FMP-field: ItemID]

</a>

------------------------------------

looks like:

http://mostarnet.com/FM.jpg

for whatever is worth....

All the best!

Posted

Thanks, Leb. I'll take a look at that.

But the original question is still puzzling, and I probably didn't state it clearly at all. I had developed a calculation field in the DB that contained EITHER the text "Image to come" OR the following code.

<A HREF="[FMP-linkrecid: layout=dataentry, format=MMZWEB/MMZdetaillarge.html]" target="_blank">

<img src="[FMP-Field: photothumb]" border="0"></A>

The question is, why would this code work in the HTML page but not, exactly the same, coming out of a FM field. I've gotten <img> and <A HREF> links to work fine, using the "raw" parameter. It seems like the "FMP-linkrecid:" is the only difference. Even though I've got the thing working, I'm still curious about why the original approach didn't work.

Posted

Gary,

Thanks, but I did add the "raw" parameter (which is how I got the other kinds of links to work). As I say, the only difference was using the "FMP-linkrecid," so maybe it's in there somewhere.

Or I could have missed something. Someday I'll try it again, and if the same thing happens I'll do another post.

Thank you all.

Ernie

This topic is 7835 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.