Special Targets for External Links, New Windows

Applies to HTML Viewer, IE Browser publications.

Hyperlinks may have a target. HTML Executable provides you with some pre-defined targets that you can use not only for hyperlinks in your publications, but also for menu items, TOC entries

Syntax:

<a target="[target]" href="[destination URL]">Your link</a>

List of predefined targets:

  • _heopenit: extracts the file specified by destination URL and runs the associated program to open this file. The file is then deleted when the publication is closed.

  • _blank: this target in IE Browser publications creates a popup window (to avoid this behavior, check out the NoAutomaticPopup property). However, HTML Viewer publications won’t open a new window but they will display the page in the main window except if the link is external, i.e. http:, ftp:, etc… In fact, for security reasons, you cannot access compiled pages outside a publication. If you want to open a compiled page in a new window, then use _henewinstance.

  • _hepopup_[name]: opens a new pop-up window whose name is set to name.

  • _heexternal: forces the publication to open the destination URL in the default web browser (Internet Explorer or Mozilla Firefox for instance).

  • _henewinstance: opens a new stand-alone instance of the publication that will display the specified URL.

  • _hemain: opens the destination in the main window.

How to open a URL in the default web browser

This will start the end user’s default browser to view gdgsoft.com:

<a target="_heexternal" href="https://www.gdgsoft.com">View gdgsoft.com</a>

How to open a new instance

This will start a new instance and display “index.htm”:

<a target="_henewinstance" href="index.htm">My link</a>

How to view a document file such as Word, Excel and so on

_heopenit can be used for any document file like executable program files, text files, Microsoft Office® files, etc…

<a target="_heopenit" href="mydocument.docx">Open this Word document</a>

Copyright G.D.G. Software 2018. All rights reserved