Jump to content

Get web address to work as a link

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

Recommended Posts

OK, gave up on the instant publishing. Was taken over by the dark side and went custom. So far so good...

One little obstacle. Trying to make a web address entered in a field in filemaker become an actual active link when viewed in the web browser. Here is what I have:

Database name is "Products.fp5"

Field name containing address is "FTP"

Now my search engine is working. I select a name, the browser goes to me "list.txt" file I set up and shows my search results. One of those results is [FMP-field:ftp]. But the text here is just static...

how do I make it where it is an actual link that if someone clicks on it directs them to the site entered in the "FTP" field in the filemaker database.

Am I asking this in the correct way...pretty new to the Custom Web stuff in FileMaker.


Link to comment
Share on other sites

You need to put this code into the html format file: this code assumes you want to display the link as the link name...

<a href="[FMP-Field: FTP, raw]">[FMP-Field: FTP, html]</a>

Note the "raw" and "html" options in the [FMP-Field] CDML tags: these are important!

My syntax above might be a little bit off, but it'll give you the idea. The data in the url field needs to include the "http://" prefix, otherwise you need to include it in the code above. In fact, the best policy is always to enter *full* urls into fields, that way the correct prefix for http and ftp will be included.

Link to comment
Share on other sites

Question. Assuming everything above mentioned stays the same except one item...

Instead of it being a web address being entered into filemaker and showing up as a link in web publishing, what if it is a email address being entered into the database field. how would the above code example given to make it act as a html link have to change to get it to act as an email link?


[ March 12, 2002, 11:14 AM: Message edited by: Larry Ross ]

Link to comment
Share on other sites

Makes good sense. It works as described. One question though...

In filemaker I entered the address into the field like so: mailto:[email protected].

My code in the htm document read as: <a href="[FMP-Field: rro, raw]">[FMP-Field: rro, emailaddresses]>

This of course works, but the link that shows up on the web page is: mailto:[email protected]. Is there a way to have the link show up on the web page and not have it show with the mailto: in front of the email address?


[ March 14, 2002, 10:11 PM: Message edited by: Larry Ross ]

Link to comment
Share on other sites

I think that putting a complete email ou url address in a field is an easy way out but a limiting practice when it come to retuned lists or CDML manipulation like with FMP-IF because of their lenght variety. You then have to softwrap them.

If you stick with your idea, you could use <A HREF="[FMP-Field: address]">@</A> for email or <A HREF="[FMP-Field: address]">www</A> for website adresses.

Users can see the mailto:[email protected] or https://www.domaine.tld by positioning the mouse cursor over the link. I think you can also use ALT="[FMP-Field: address]" with browser that support ToolTips (the little yellow box that appear at mousepoint), OnMouseOver in javascript or other web techniques

In my websites.fp5 database, I split the method (ftp, http, https), the domain (www.domain.tld) and the locator (/faq/help.html) for statistical puposes like how many websites are SSL secure or hosted at www.mac.com or how many hackable users use hotmail.com shocked.gif !

I then assemble <A HREF="[FMP-Field: method]???/[FMP-Field: domain][FMP-Field: locator]" ALT="[FMP-Field: WebSiteOwnerName]">www</A>

Assuming you don't mix email and websites URLs in the same field that is...

Link to comment
Share on other sites

OK, I got the above mentioned to work. It worked for both http as well as mailto: although I had to modify the code a bit for the email stuff. Thanks for the tip.


[ March 15, 2002, 08:27 AM: Message edited by: Larry Ross ]

Link to comment
Share on other sites

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