KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Embedding HTML in a 4D form web-served in Contextual Mode
PRODUCT: 4D | VERSION: | PLATFORM: Mac & Win
Published On: March 30, 2001

How to embed HTML in a 4D application and open a Web client's default E-mail and have the E-mail address and subject fields filled in.


  1. Create a variable named "variable1".
  2. Make the variable "not enterable".
  3. Make sure the "on load" is turned on in the object properties list.
  4. Add an object method to the variable "variable1" and add this code


If (Form event = On load)
Self->:=Char(1)+"<a href="+Char(Double quote)+"mailto:cyang@4D.com?subject=test"+Char(Double quote)+">Click here to send E-mail.</a>"
End If

This link when clicked on will open the web browsing computer's default E-mail application and paste "cyang@4D.com" in the "To:" field and "test" in the "Subject:" field.