Title: please help with javascript calculator/form
Last modified: August 19, 2016

---

# please help with javascript calculator/form

 *  Resolved [reneeholiday](https://wordpress.org/support/users/reneeholiday/)
 * (@reneeholiday)
 * [18 years, 6 months ago](https://wordpress.org/support/topic/please-help-with-javascript-calculatorform/)
 * I am converting a client’s static site to a WordPress site. They want me to include
   an INTEREST CALCULATOR.
 * See original calculator on the old/static site here [http://www.floridacollections.com/interest.htm](http://www.floridacollections.com/interest.htm)
 * I have pasted the form/table into the RESOURCES page. See it here [http://www.dominant-paradigm.com/flcollections/resources/](http://www.dominant-paradigm.com/flcollections/resources/)
 * And I put the head javascript into the HEADER of the theme. I also turned off
   the rich editor before pasting the code.
 * But I really do not know anything about javascript. So I am stumped, even after
   reading the codex page about inserting javascript. I could create an external.
   js file to remove the code from the header. But I don’t know how exactly to CALL
   it, on the Resources page.
 * Please advise.
 * Many thanks!
    renee

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Michael Fields](https://wordpress.org/support/users/mfields/)
 * (@mfields)
 * [18 years, 6 months ago](https://wordpress.org/support/topic/please-help-with-javascript-calculatorform/#post-665310)
 * Renee,
 * Hi
    If you look at the html source you will notice that the form is started and
   terminated on the same line with no form elements enclosed. When you scroll down
   the page, you will notice the form elements are present in the document – but
   they are OUTSIDE of the form tags. This is the cause of the javascript malfunctioning.
 * WordPress MAY be terminating the form tag for you as a security measure – not
   sure on this though.
 * Here’s what I would do:
 * Create a new template file. I would name it `template-interest-calculator.php`.
   Save this file in your theme’s directory. The first thing that goes in the file
   is:
 *     ```
       <?php
       /*
       Template Name: Interest Calculator
       */
       ?>
       ```
   
 * Next, copy and paste the code from your theme’s `single.php` file. Then, I would
   hard code the form into the template file directly above or below The Loop.
 * Next, you will need to go to you wordpress admin section and apply the new template
   to your page. Navigate to ‘Manage’ -> ‘Pages’ and click edit on the page that
   contains the calc…
 * 1. Delete all form code from the ‘Page Content’ box.
    2. Select “Interest Calculator”
   from the ‘Page Template’ tab on the right hand side bar. 3. Click “Save and Continue
   Editing” and preview your page in a new tab.
 * Hope this helps,
    -Mike
 *  Thread Starter [reneeholiday](https://wordpress.org/support/users/reneeholiday/)
 * (@reneeholiday)
 * [18 years, 6 months ago](https://wordpress.org/support/topic/please-help-with-javascript-calculatorform/#post-665388)
 * Mike,
 * Fantastic!!! It worked. I learned something very useful, thanks to you!
 * Many thanks!!!
    renee
 *  [melvins138](https://wordpress.org/support/users/melvins138/)
 * (@melvins138)
 * [18 years, 3 months ago](https://wordpress.org/support/topic/please-help-with-javascript-calculatorform/#post-665509)
 * Mike,
 * I, too, want to thank you for this lesson. You made my life a whole lot easier
   with this. Thank you!
 * Ryan

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘please help with javascript calculator/form’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 3 participants
 * Last reply from: [melvins138](https://wordpress.org/support/users/melvins138/)
 * Last activity: [18 years, 3 months ago](https://wordpress.org/support/topic/please-help-with-javascript-calculatorform/#post-665509)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
