Jump to content

Formatting the Body-section in "mailto:"


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

Recommended Posts

I want to place this in a field (product description):

If ( IsEmpty ( Varer::LABEL ) ;
   "Best. nr.: " & "<a href="mailto:[email protected]?subject=CD-info&amp;body=Please%20send%20me%20more%20information%20about%20TROY%201298."><span style="color: rgb(0, 0, 255);"><u>" & Varer::VARENUMMER % "</u></span></a>";

I'm told that "The specified field doesn't exist" (mailto:[email protected]). I guess I need to add a field for that, but where and how?

 

The output from this field are (together with other fields) exported to a tab delimmited file and imported in OsCommerce.

P.S. Using "mailto" in a a text isn't a good idea, I believe. Any ideas how to make it spam safe?

 

A test sample can be viewed here: http://danacordbutik.dk/product_info.php?manufacturers_id=&products_id=4364

Link to comment
Share on other sites

You must escape quotes that are part of literal text, using " instead of ". Alternatively, use single quotes ' instead.

 

 

The output from this field are (together with other fields) exported to a tab delimmited file

 

You are passing HTML code in a tab-delimited file?

 

 

P.S. Using "mailto" in a a text isn't a good idea, I believe. Any ideas how to make it spam safe?

 

Not sure what the context here is (the link is not particularly informative either). Perhaps do a search for e-mail obfuscation?

Link to comment
Share on other sites

I can't get "mailto" to work in HTML-output.

 

I have a calculated field in FMP11. An export in TAB-delimited file format are imported in a webshop (osCommerce variant). Among others I have this line:

"Best. nr.: " & "<b>" & "<a href=""mailto:[email protected]?subject=Info%20om%20CD&amp;body=Send%20venligst%20info%20om%20CD""><span style=""color: rgb(0, 0, 255);""><u>" & Varer::VARENUMMER & "</span></u></b></a>" & "<br>"

As you can see I want the field "Varer::VARENUMMER" to behave as a link to send a mail to me. Unfortunately it doesn't work as I want. Instead it works as a link/URL to the root of the shop (danacordbutik.dk).

 

What am I doing wrong?

 

For the moment the example can be seen here: http://danacordbutik.dk/product_info.php?manufacturers_id=&products_id=1435

Link to comment
Share on other sites

I'm working on it right now (GMT :laugh2:). It seems to be a problem in osC when the TAB-delimited file are imported. Viewing the code in the webshop editor shows some differences from the FM-generated code.

 

I will return to this. Until then comment will be appreciated. Maybe the are an alternative solution?

Link to comment
Share on other sites

Aha!

 

In the Filemaker editor I enter this:

<a href=""""mailto:[email protected] .......

which is converted to:

<a href=""mailto:[email protected] .......

when saving.

 

Looking at the output I see this:

<a href=""mailto:[email protected] .......

As you may notice there are TWO double quotes!!!

 

This is off course the reason why the link doesn't work in the webshop, but WHY are the code generated with incorrect HTML syntax? Something wrong with the escaping?

Link to comment
Share on other sites

1. The link does not seem to contain anything relevant to your question.

 

2. Why do you have two pairs of quotation marks surrounding the mailto URL?

 

1. The links show a product in the webshop when the output from FM are imported.

 

2. I also wonder (please read my most recent post)

Link to comment
Share on other sites

1. The links show a product in the webshop when the output from FM are imported.

 

There is no mailto link on that page, or anything close to it.

 

 

 

In the Filemaker editor I enter this:

<a href=""""mailto:[email protected] .......

 

Why don't you try entering just:

<a href=""mailto:[email protected] .......

or the straightforward:

<a href="mailto:[email protected] .......
Link to comment
Share on other sites

 

There is no mailto link on that page, or anything close to it.

 

I'm sorry; maybe I have changed it in the meantime :yep:

 

 

or the straightforward:<a href="mailto:[email protected] .......

 

 

The method with four double quotes in the editor was found here: http://fmforums.com/forum/topic/94000-how-to-insert-an-email-address-in-output-text/. How should I know that ... - I'm a novice, you know :jester:

<a href="mailto solved the problem.

 

There is still a couple of issues regarding my "Product description", but I'm very happy about the solution to this subject. Thank you for your help.

Link to comment
Share on other sites

 

For the moment the example can be seen here: http://danacordbutik.dk/product_info.php?manufacturers_id=&products_id=1435

 

Please post your file here.

 

If you don’t know how to do this, just follow the steps you’ll find here ATTACH A FILE

 

There are several reasons that we want the files posted here, some of them are because, links get broken, links can be spam, the files get removed after the OP gets their solution, etc., Because this is is a learning Forum, often a solution that works for one member can be the answer another member needs. Without the demo file, there is a hole in the process.

 

I could not get the links you posted to work. One of them took me to a commercial site, probably yours. The last one was a loop back to this Thread.

 

Lee

Link to comment
Share on other sites

I'm trying to format a calculated field to output af text (TAB-separated file) for import into a osCommerce webshop.

 

Formatting the "body" sections makes some troubles for me.

 

This line:

"Order no: " & "<b>" & "<a href="mailto:[email protected]?subject=Info%20on%20vproduct%20in%20your%20webshop "& "&amp;body=Please&20send%20detailed%20info%20about%20this%20CD: " & Varer::VARENUMMER & "Dummy text" & "">"  & "<span style="color: rgb(0, 0, 255);"><u>" & Varer::VARENUMMER& "</span></u></b></a>" & 

results in "Please send detailed info about this CD: ARS 38099Dummy test" in the email body. Try for yourselves: http://danacordbutik.dk/product_info.php?manufacturers_id=&products_id=1435

 

I have tried "all" pssibilites of breaking the first line in "Body".

 

Whar I want is THIS output in the email body:

Please send detailed info about this CD: ARS 38099

Kind regards:
Link to comment
Share on other sites

DaCo,

 

I’m not sure what your question is? You can post more than one file to a question?

 

If you are saying that you solved this problem, that’s great. However, you need to post the file here that you were trying to link. 

 

If you have other questions on the same need, and it requires a different file, then post it too.

 

If you need a file to demonstrate the question, than attach it to a Reply.

 

Lee

Link to comment
Share on other sites

Now I see what you meant in the previous topic. This is a splinter topic of it.

 

I’m going to merge them. Please do not multiple post the same question, or a new step in an old question. It makes it hard for the reader to follow your need.

Link to comment
Share on other sites

Lee,

 

I feel really stupid because I still do not understand which file I expected to upload (as attachment). As I see it there are three elements in my problem:

  • The codes as I knit together in FM's editor.
  • The TAB-separated file exported from FM and imported into osCommerce database.
  • The source code as it looks when seen / manipulated in osCommerce's editor.

I am in despair that I am not able to "behave properly" and do what I'm supposed to do. Please specify what exactly what I need to upload.

 

I also regret that I - in the best sense - miscalculated the continuity of the subject and chose to start a new thread.

Link to comment
Share on other sites

I also regret that I - in the best sense - miscalculated the continuity of the subject and chose to start a new thread.

 

Don't worry about it ... this is a friendly community and Lee rarely bites.  :-)

Link to comment
Share on other sites

This is not a Filemaker question. Find out what the link needs to look like on your web page first. Then, if you have a problem producing it in Filemaker, ask about that.

 

Hmmm, I suppose you are right. My remaining problem is that I can not get line break to work in that part of the mailto line, which forms the body portion. It's just hard for a novice to determine with certainty whether it is due to the string as FM's editor allows me to write, or whether it is me who does not write a proper HTML syntax. I have tried to Google but have not found anything about how to make a line break inside the "body =" in "mailto:".

Link to comment
Share on other sites

Don't worry about it ... this is a friendly community and Lee rarely bites.  :-)

 

For some reason, several of my threads landed on their stomach, but you're right: Lee never loses his temper, which is a great advantage for me :jester: 

Link to comment
Share on other sites

Hmmm, I suppose you are right. My remaining problem is that I can not get line break to work in that part of the mailto line, which forms the body portion. It's just hard for a novice to determine with certainty whether it is due to the string as FM's editor allows me to write, or whether it is me who does not write a proper HTML syntax. I have tried to Google but have not found anything about how to make a line break inside the "body =" in "mailto:".

 

This morning (GMT) I made another Google search, this time with other keywords and ... Viola!!!! The first hit was this page How to enter line break into mailto body command and the solution solved my only remaining problem in this thread.

 

I have made an example in english. Feel free to have a look and test the mail link.

 

Thank you all for any help :hug:

Link to comment
Share on other sites

DaCo,
 
I’m sorry if I have confused you in some way about posting files. Perhaps you didn't see my Reply #12 above. If you did, then I’m confused as to why you linked the file instead of attaching it to a reply?    :confused: 
 
Lee
 
p.s.
I still don’t see a file at your link?
Edited by Lee Smith
p.s.
  • Like 1
Link to comment
Share on other sites

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