Title: Javascript onchange
Last modified: September 6, 2016

---

# Javascript onchange

 *  [timhartog](https://wordpress.org/support/users/timhartog/)
 * (@timhartog)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/javascript-onchange/)
 * Hello,
 * Is it possible to use javascript in contact form7
 * I am trying to use this code,
 *     ```
       Totale investering in het project:
       [number* totale_investering id:totalcost]
       Financieringsbedrag ( maximaal 75% van totale financiële investering):
       [number* financieringsbedrag onchange="test()" id:financeamount]
       <p id="bedrag"></p>
       ```
   
 *     ```
       <script>
       function test(){
       var financeamount  = document.getElementById("financeamount").value;
       var totale_investering  = document.getElementById("totale_investering").value;
   
       if (financeamount <= totale_investering/ 100 * 75 ){
                document.getElementById("bedrag").innerHTML = " ";
           }
       else
       {
        document.getElementById("bedrag").innerHTML = "Financieringsbedrag ( maximaal 75% van totale financiële investering):";
       }
       }
   
       </script>
       ```
   
 * I hope someone can help me with this .
    thank you in advance
 * timhartog

The topic ‘Javascript onchange’ is closed to new replies.

 * ![](https://ps.w.org/contact-form-7/assets/icon.svg?rev=2339255)
 * [Contact Form 7](https://wordpress.org/plugins/contact-form-7/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7/reviews/)

## Tags

 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [onchange](https://wordpress.org/support/topic-tag/onchange/)

 * 0 replies
 * 1 participant
 * Last reply from: [timhartog](https://wordpress.org/support/users/timhartog/)
 * Last activity: [9 years, 8 months ago](https://wordpress.org/support/topic/javascript-onchange/)
 * Status: not resolved