3 Replies Latest reply: Feb 4, 2013 9:53 AM by User446274 RSS

    How to display image button that can open outlook

    User446274
      I would like to display an image button (PS_SEND_MAIL_ICN) in a page. When cliked, the button should be able to open outlook with the destination field preset with an email address .

      I have done the following:

      1. Create an HTML aera field: IMAGE_HTML
      2. Added the field in a record : RECORD.IMAGE_HTML
      3. Added the record field in a page
      4. In the peopleCode page Activate populate the HTML aera:

      SQLExec("select CONTNAME from PSCONTDEFN where (contname = 'PS_SEND_MAIL_ICN' and ALTCONTNUM=1)", &emailIconName)
      RECORD.IMAGE_HTML.Value = "<a herf='mailto:email_address@.....'><img src='%Image(" | &emailIconName | ")'/></a>"

      I am succed to open outlook when clicking on the button but the image cannot be displayed properly. An icon with an X is displayed.

      Is there another way to accomplish this?

      Thanks