I am totally duh at javascript although I have 2 books trying to learn it.
I am trying to add values to a form and have a calculate total at end.
this is my form script. I have hours at end of each radio or checkmark. (If this is checked, add these hours. ) I want to calculate total at the calculate button at the bottom of the form and have a window that shows the total.
please excuse the long form, but with all the different variables I thought it wise to post whole thing.
[HTML]<form method="post" action="">
<fieldset name="General">
<legend class="alignleft">General</legend>
<p>
<input name="Have_Site" type="radio" checked="checked" />
I have an existing website. (0 hours)</p>
<p><input name="Have_Site" type="radio" />
I need a basic blog site. (3 hours)</p>
<p>
<input name="Have_Site" type="radio" />
I need a basic, off the shelf, template based site
set-up. (6 hours)</p>
<p><input name="Have_Site" type="radio" /> I need a completely custom site. (15 hours)<br />
</p>
</fieldset>
<fieldset name="Site Layout">
<legend class="alignleft">Site Layout</legend>
<p>
<input name="No_Graphics" type="radio" checked="checked" />
I do not need any unique graphics designed.
(0 hours)</p>
<p><input name="Have_Graphics" type="radio" /> I have all
my graphics but they need to be integrated. (3 hours)</p>
<p><input name="Template_Minor" type="radio" /> I have a
template but it needs minor customization. (6
hours)</p>
<p><input name="Template_Major" type="radio" /> I have a
template but it needs major custimzation. (10
hours)</p>
<p><input name="Custom_Design" type="radio" /> I would
like a custom design created for my site. (20
hours) </p>
</fieldset>
<fieldset name="Other Graphics">
<legend class="alignleft">Other Graphics</legend>
<p><input name="Need_Custom_Graphics" type="checkbox" /> I
need some custom graphics made. (4 hours)</p>
<p><input name="Mouse-over_Graphics" type="checkbox" /> I
need graphic mouse-over buttons. (4 hours)</p>
<p><input name="Few_Stock" type="checkbox" /> I
need a few stock photographs integrated. (4 hours)</p>
<p><input name="More_Stock" type="checkbox" /> I
need several stock photographs integrated. (9
hours)</p>
</fieldset>
<fieldset name="Flash">
<legend class="alignleft">Flash</legend>
<p><input name="Flash_Menu" type="checkbox" /> I
need a flash menu. (6 hours)</p>
<p><input name="Flash_Animation" type="checkbox" /> I
need a short custom flash animation. (3 hours)</p>
<p><input name="Total_Flash" type="checkbox" /> I
want my site in Flash for a total of
<select name="Select1">
<option></option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
<option>7</option>
<option>8</option>
</select> pages. (5 hours per page.)</p>
<p><input name="Flash_Banner" type="checkbox" /> I
need a flash banner. (4 hours)</p>
</fieldset>
<fieldset name="Content">
<legend class="alignleft">Content</legend>
<p>
<input name="I_add_Content" type="radio" checked="checked" />
I will add my content with a content manager. (0
hours)</p>
<p><input name="Content_Pages" type="radio" /> I will
supply <select name="Select2">
<option></option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
<option>7</option>
<option>8</option>
<option>9</option>
<option>10</option>
</select> pages of content in MS Word or Notepad text.
(3 hours per page)</p>
<p><input name="Copyrighting_Pages" type="checkbox" /> I need
<select name="Select3">
<option></option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
<option>7</option>
<option>8</option>
<option>9</option>
<option>10</option>
</select> pages of copywriting done for my content.
(5 hours per page.<br /></p>
</fieldset>
<fieldset name="Public Features">
<legend class="alignleft">Public Features</legend>
<p><input name="Member_Registration" type="checkbox" />
Member Registration (6 hours)</p>
<p><input name="Discussion_Forum" type="checkbox" />
Discussion Forum (5 hours)</p>
<p><input name="Contact_Form" type="checkbox" />
Contact Form ( 3 hours)</p>
<p><input name="Links_Page" type="checkbox" />
Links Page (3 hours)</p>
<p><input name="Site_Search" type="checkbox" />
Site Search (4 hours)</p>
<p><input name="Auto-Responder" type="checkbox" />
Email Auto-responder (2 hours)</p>
<p><input name="File_Upload" type="checkbox" />
File upload ( 8 hours)</p>
</fieldset>
<fieldset name="Ecommerce">
<legend class="alignleft">Ecommerce</legend>
<p><input name="Simple_Cart" type="checkbox" />
Simple shopping cart (5 hours)</p>
<p><input name="Database_Cart" type="checkbox" />
Database shopping cart (10 hours)</p>
<p><input name="Credit_Card" type="checkbox" />
Credit Card Processing ( 4 hours)</p>
<p><input name="PayPal" type="checkbox" />
PayPal processing</p>
</fieldset>
<fieldset name="Admin_Features">
<legend class="alignleft">Admin Features</legend>
<p><input name="Blog" type="checkbox" /> Off
the shelf Blog (3 hours)</p>
<p><input name="Custom_Blog" type="checkbox" />
Custom Site Blog (6 hours)</p>
<p><input name="Photo_Gallery" type="checkbox" />
Photo Gallery (6 hours)</p>
<p><input name="Member_Admin" type="checkbox" />
Member Administration (5 hours)</p>
<p><input name="Site_Statistics" type="checkbox" />
Site Statistics (1 hour)</p>
</fieldset>
<fieldset name="SEO">
<legend class="alignleft">SEO</legend>
<p><input name="MetaTag" type="checkbox" />
MetaTag Keyword Optimization (5 hours)</p>
<p><input name="Search_Engine_Submission" type="checkbox" />
Search Engine Submission (3 hours)</p>
<p><input name="Link_Building" type="checkbox" />
Minor Link Building (6 hours)</p>
</fieldset>
<br />
<input name="Calculate_Cost" type="button" value="Calculate Cost" /></form>[/HTML]