# Using JavaScript in IHTML-Control

**URL:** <https://techcommunity.softwareag.com/t/using-javascript-in-ihtml-control/100696>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, NaturalONE, Natural-for-AJAX\
**Created:** [June 11, 2012, 12:58pm UTC](https://techcommunity.softwareag.com/t/using-javascript-in-ihtml-control/100696 "2012-06-11T12:58:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gerhard\_Pichler](https://avatars.discourse-cdn.com/v4/letter/g/8e8cbc/32.png) [@Gerhard\_Pichler](https://techcommunity.softwareag.com/u/Gerhard_Pichler)\
**Post date:** [June 11, 2012, 12:58pm UTC](https://techcommunity.softwareag.com/t/using-javascript-in-ihtml-control/100696/1 "2012-06-11T12:58:19Z")

</div>

I try to use JavaScript in the IHTML-Control. Here’s some example code:

compress  
‘abc’  
‘’  
‘geh’  
to ihtml\_valueprop leaving no  
/\* H’22’ = "

When I run the application it only shows “abcgeh” and not “abcdefgeh”. When I use the same code in a HTML-page it works fine.  
Why doesn’t it work in NJX or what’s wrong with my implementation?

Thanks!  
Gerhard

---

<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 11, 2012, 4:03pm UTC](https://techcommunity.softwareag.com/t/using-javascript-in-ihtml-control/100696/2 "2012-06-11T16:03:34Z")

</div>

The difference is that you have a static HTML page versus HTML being dynamically  
injected into an existing page, the script code is added to the page but will not  
be triggered.

---

<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:02pm UTC](https://techcommunity.softwareag.com/t/using-javascript-in-ihtml-control/100696/3 "2021-04-02T15:02:02Z")

</div>


