Navigation: For Developers >

Special Targets for External Links

 

 

 

 

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] (it must be the virtual path starting from the root without the protocol: `MyPath\MyFile.ext`) and runs the associated program to open this file. The file is then deleted when the publication is closed.

Ø`_blank`: this target creates a popup window.

Ø`_heexternal`: forces the application 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 application 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>