Create a Mailto-Link for HTMLJavascript widget without opneing a new browser tab

Hi there,

i want to show on my form a HTMLJavascriptwidget to open the (win)mail-client directly. With this code the Browser shows a new-tab-warning an opens a new empty browsertab:

<a href="mailto:testmail@iabc.de" target="" extlink="true">Testmail</a><br><br>

I tried without the "target"-tag, but SBM redirects me every time to the warning and new empty tab. In the background my mailclient opens and do the correct things.....

<a href="mailto:testmail@abc.de">Testmail</a><br><br>

What else can I do? Try on Javascript?

Thanks for your help.

Greetings

Parents
  • 0

    Edit: The reason seems to be a external_link_interception javascipt somewhere deep in SBM which occurs when clicking external links......

    function(e) {
      e.preventDefault();
      e.stopPropagation();
      openExternalLinkInNewTab(element.href);
      return false;
    }

    How can i deactivate it in this case?

  • 0   in reply to 

    I think the issue may be that the HTMLJS widget becomes an embedded iframe.  Try one of the following options:

    1. Add a URL control to your form.
    2. Add a text field with a prefix and suffix to create the link.  Default the field to be your link text and use target="_top".  Like this.

  • 0 in reply to   

    Hi David, thanks for your reply.

    I tried to create a text field like this:

    Unfortunately my field appears after deploying like this:

    So, it doesn't work.....Are there any other solutions? What do you mean by "Add a URL-Control to your form? I only see in composer these options:

    Tried hyperlink, but there is only the option, to open in a new window....

    Are there any other ideas instead of changing HTML Sanitizer-options in workcenter settings for all apps?

    Thanks for any help.

Reply
  • 0 in reply to   

    Hi David, thanks for your reply.

    I tried to create a text field like this:

    Unfortunately my field appears after deploying like this:

    So, it doesn't work.....Are there any other solutions? What do you mean by "Add a URL-Control to your form? I only see in composer these options:

    Tried hyperlink, but there is only the option, to open in a new window....

    Are there any other ideas instead of changing HTML Sanitizer-options in workcenter settings for all apps?

    Thanks for any help.

Children