Wordpress Themes - WP Forum at BFA
Click here to register or to donate.
Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme »

Help with Javascript Calculator/Form

Old Sep 2, 2009, 10:44 PM
SupraTT's Avatar
78 posts · May 2009
I hope someone can help me here. I been trying to get a javascript form for a calculator to work on a post or page.

I found this thread, where the OP had a similar question:


Basically, the solution was to make a copy of single.php and hardcode the javascript form into the new template.php.

Can someone guide me in the righ direction in doing this with Atahualpa? I tried copying index.php to a new file named calc.php, but even before inserting my javascript code it will not even load (just produces errors).

Thank you
Old Sep 2, 2009, 11:28 PM
SupraTT's Avatar
78 posts · May 2009
Okay, I actually figured out how to make the template page and put my code in. However, the problem I am having is that when I tryt submit the form, all I get is a "Not Found" page error. Is it because my php variables are not set or are lost when I submit the form?

I know the code works, because if I make a standalone .php page, I am able to use the calculator. I do have the following above the header for my .php page:

// Initialize the variables
if (isset($_POST['L'])) {
    $L = $_POST['L'];
if (isset($_POST['c'])) {
    $c = $_POST['c'];
if (isset($_POST['cp'])) {
    $cp = $_POST['cp'];
if (isset($_POST['n'])) {
    $n = $_POST['n'];
if (isset($_POST['P'])) {
    $P = $_POST['P'];
if (isset($_POST['Pp'])) {
    $Pp = $_POST['Pp'];
if (isset($_POST['p'])) {
    $p = $_POST['p'];
if (isset($_POST['Calculate'])) {
    $Calculate = $_POST['Calculate'];


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
Styling the comments area title font, form field and label font, and form field sizes jkintzele Comments, trackbacks & pings 5 Nov 10, 2009 10:18 AM
Instal BMI Calculator tarragon Plugins & Atahualpa 1 Aug 23, 2009 10:09 AM
[3.3.3]Javascript Rotation Question Pxl_Buzzard Header configuration & styling 2 May 9, 2009 06:18 AM
Issue with Javascript and Lightbox brigade Atahualpa 3 Wordpress theme 1 Feb 23, 2009 04:11 PM
Help with javascript dock menu Ace Header configuration & styling 2 Feb 20, 2009 03:50 PM

All times are GMT -6. The time now is 07:00 AM.

Powered by vBulletin® Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.