# How to define clickable hyperlinks in text output controls

**URL:** <https://techcommunity.softwareag.com/t/how-to-define-clickable-hyperlinks-in-text-output-controls/182363>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, NaturalONE, Natural-for-AJAX, Natural-on-Windows-Unix\
**Created:** [June 16, 2015, 11:52am UTC](https://techcommunity.softwareag.com/t/how-to-define-clickable-hyperlinks-in-text-output-controls/182363 "2015-06-16T11:52:47Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hermann\_Platzer](https://avatars.discourse-cdn.com/v4/letter/h/a8b319/32.png) [@Hermann\_Platzer](https://techcommunity.softwareag.com/u/Hermann_Platzer)\
**Post date:** [June 16, 2015, 11:52am UTC](https://techcommunity.softwareag.com/t/how-to-define-clickable-hyperlinks-in-text-output-controls/182363/1 "2015-06-16T11:52:47Z")

</div>

Hi,

I have following question - is there a possibility to present to the user a clickable hyperlink in a TEXT control (display only)

e.g. some information is displayed to the user in a textbox  
" … for further information see: [here](http://www.yahoo.com)"

and the user just clicks on the link to find the information.

I saw the NJX\_DOCUMENTLINK in the documentation but this is “only” the link  
What I am searching for is an embedded link in a text output.

BR,  
Hermann

---

<div class="post-metadata">

**Author:** ![Christine\_Zimmermann](https://avatars.discourse-cdn.com/v4/letter/c/839c29/32.png) [@Christine\_Zimmermann](https://techcommunity.softwareag.com/u/Christine_Zimmermann)\
**Post date:** [June 16, 2015, 12:40pm UTC](https://techcommunity.softwareag.com/t/how-to-define-clickable-hyperlinks-in-text-output-controls/182363/2 "2015-06-16T12:40:47Z")

</div>

Hi Hermann,

in a TEXTOUT control, you can set straighttext=“true” and then have “html-pieces” in your text.

Best Regards,  
Christine

---

<div class="post-metadata">

**Author:** ![Hermann\_Platzer](https://avatars.discourse-cdn.com/v4/letter/h/a8b319/32.png) [@Hermann\_Platzer](https://techcommunity.softwareag.com/u/Hermann_Platzer)\
**Post date:** [June 16, 2015, 3:05pm UTC](https://techcommunity.softwareag.com/t/how-to-define-clickable-hyperlinks-in-text-output-controls/182363/3 "2015-06-16T15:05:38Z")

</div>

Hi Christine,

I tried with TEXTOUT and set straighttext=“true” but unfortunately it’s still text only - no link 😢

What’s wrong?

BR,  
Hermann  
 ![2015-06-16_1508.png](https://global.discourse-cdn.com/techcommunity/original/2X/d/de7074c081f240caa48ffa53632234743dcf8bfe.png)

---

<div class="post-metadata">

**Author:** ![Christine\_Zimmermann](https://avatars.discourse-cdn.com/v4/letter/c/839c29/32.png) [@Christine\_Zimmermann](https://techcommunity.softwareag.com/u/Christine_Zimmermann)\
**Post date:** [June 16, 2015, 7:55pm UTC](https://techcommunity.softwareag.com/t/how-to-define-clickable-hyperlinks-in-text-output-controls/182363/4 "2015-06-16T19:55:16Z")

</div>

Hi Hermann,

sorry, I mismatched true and false.  
Working example:

```auto

<textout valueprop="mytextout" width="400" height="300" straighttext="false">
</textout>
```

and then in the Natural code for instance

```auto

DEFINE DATA LOCAL
1 MYTEXTOUT (A) DYNAMIC
END-DEFINE
*
COMPRESS 'Text with link <a href="http://www.yahoo.com">The Link is here</a>' INTO MYTEXTOUT  
*
```

straighttext=true means “not interpreted by the browser”.

Best Regards,  
Christine

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [June 17, 2015, 2:10pm UTC](https://techcommunity.softwareag.com/t/how-to-define-clickable-hyperlinks-in-text-output-controls/182363/5 "2015-06-17T14:10:42Z")

</div>

The question is:

what do you expect to happen when the user clicks the link ?

If you trigger external content and don’t add a target=“\_blank” to the hyperlink the new page will overlay the NJX session without a way back.

Or do you expect the NJX session to react on the link ?

---

<div class="post-metadata">

**Author:** ![Hermann\_Platzer](https://avatars.discourse-cdn.com/v4/letter/h/a8b319/32.png) [@Hermann\_Platzer](https://techcommunity.softwareag.com/u/Hermann_Platzer)\
**Post date:** [June 17, 2015, 3:39pm UTC](https://techcommunity.softwareag.com/t/how-to-define-clickable-hyperlinks-in-text-output-controls/182363/6 "2015-06-17T15:39:38Z")

</div>

Thanks - it works 😃  
I’ve already added target=\_blank as the link should open in a separte window (external content)

BR,  
Hermann

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 3:33pm UTC](https://techcommunity.softwareag.com/t/how-to-define-clickable-hyperlinks-in-text-output-controls/182363/7 "2021-04-02T15:33:37Z")

</div>


