Issue

Is it possible to configure an image map in my eCatalog to send an email?

Solution

Scenario 1: Client wants the image map in their e-catalog to open the end user's email client for them to compose an email to a specific sender.

To configure an image map to launch the end user's email client, change the image map href field to be some variant of this syntax:

mailto:ADDRESS

Make sure to disable the href template for this image map. This href must be handled as an <a href> tag. It isn't handled through a JavaScript window.open function call, as with the default href Template (which references the loadProduct JavaScript function).

Scenario 2: Client wants the image map in their e-catalog to automatically send a default email message to a specific sender.

This method requires that the e-catalog is embedded in your page, and not loaded through the s7ondemand e-catalog JSP page. It requires the definition of a custom JavaScript function and access to the client's email server.

The basic idea is to implement a JavaScript function in the embedding page that can trigger their web serve'rs email server to send the desired response.

Then, it is a matter of configuring the image map to call the appropriate function on click. So, if you designed a function named SendMail(emailaddress), which references the email address to send to in the function call, you could configure the image map href field to contain the desired email addresses. Then, you could set up the href template for the e-catalog page to call the function and pass in the email address from the href field of the image map by setting the href template, like so:

javascript:SendMail('$$');void(0);

When an image map setup in this fashion is clicked, the browser makes a JavaScript call to SendMail with the href field of the image map as the parameter passed to the function. brbr

Provided the function then is configured to correctly trigger an email from the web servers email server, then this method works as desired.

本产品经 Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License 许可  Twitter™ 与 Facebook 中的内容不在 Creative Commons 的条款约束之下。

法律声明   |   在线隐私策略