# Javascript functions in HTML inputs disappear

**URL:** <https://community.hubspot.com/t/javascript-functions-in-html-inputs-disappear/15081>\
**Category:** CMS Development\
**Tags:** javascript\
**Created:** [July 2, 2019, 11:57am UTC](https://community.hubspot.com/t/javascript-functions-in-html-inputs-disappear/15081 "2019-07-02T11:57:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hubsforero](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/hubsforero/32/43872_2.png) [@Hubsforero](https://community.hubspot.com/u/Hubsforero)\
**Post date:** [July 2, 2019, 11:57am UTC](https://community.hubspot.com/t/javascript-functions-in-html-inputs-disappear/15081/1 "2019-07-02T11:57:11Z")

</div>

Hi!

I’m adding code manually to my landings (advanced--\>source code), but when inserts the piece of code and save my work, the javascript functions (the events) desappair at every “input” that is having one.

For example, in the next code “onkeyup” and “onchange” events were deleted:

"_ **\<** __ **input type=“text” name=“tasa” id=“in\_tasa” maxlength=“9” value=“0”** _

_**onkeyup=“comprobarTasacion(this, hd\_tasa)”**_

_**onchange=“comprobarTasacion(this,hd\_tasa)”**__ **\>** _"

Why are my code being deleted??? Is there any step that i’m not following? Is my bad? Does anybody knows what’s happening and can help me to solve the issue?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![MatthewShepherd](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/matthewshepherd/32/31314_2.png) [@MatthewShepherd](https://community.hubspot.com/u/MatthewShepherd)\
**Post date:** [July 2, 2019, 12:53pm UTC](https://community.hubspot.com/t/javascript-functions-in-html-inputs-disappear/15081/2 "2019-07-02T12:53:48Z")

</div>

Hi @Hubsforero

It could be that you are entering your code into a rich text module within your landing page, which can strip out more advanced HTML and JavaScript. You could [try editing your template](https://knowledge.hubspot.com/articles/kcs_article/cos-general/how-do-i-edit-my-blog-email-page-template) (I’d recommend [cloning your template](https://knowledge.hubspot.com/articles/kcs_article/cos-general/how-do-i-clone-my-blog-email-page-template)) and adding an HTML module to the template in the area you want to add the JavaScript code. You will need to install the HTML module in your portal first, you can do that by clicking on Marketing-\>Files & Templates-\>Hubspot marketplace (in your portal navigation), and then searching HTML. Select the HTML Module and click “Get For Free” and choose the portal to install it to.
