Wordpress Themes - WP Forum at BFA
Click Here To DONATE! Support the theme development, get more attention and additional benefits based on your donation level. Your forum name will be highlighted.

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

Help with Javascript Calculator/Form


Build custom WP THEMES, without
coding.
Click here for THEMEFRAME

From the author of Atahualpa, the #1 most
downloaded (700,000+) theme @ wordpress.org
  #1  
Old Sep 2, 2009, 09:44 PM
SupraTT's Avatar
SupraTT
 
78 posts · May 2009
Help with Javascript Calculator/Form

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:

http://wordpress.org/support/topic/147154

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
  #2  
Old Sep 2, 2009, 10:28 PM
SupraTT's Avatar
SupraTT
 
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:

Code:
<?php
// 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'];
}
?>

Bookmarks

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 09:18 AM
Instal BMI Calculator tarragon Plugins & Atahualpa 1 Aug 23, 2009 09:09 AM
[3.3.3]Javascript Rotation Question Pxl_Buzzard Header configuration & styling 2 May 9, 2009 05:18 AM
Issue with Javascript and Lightbox brigade Atahualpa 3 Wordpress theme 1 Feb 23, 2009 03:11 PM
Help with javascript dock menu Ace Header configuration & styling 2 Feb 20, 2009 02:50 PM


All times are GMT -6. The time now is 09:12 PM.


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