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="alignlef t">General</legend>
<p>
<input name="Have_Site " type="radio" checked="checke d" />
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="alignlef t">Site Layout</legend>
<p>
<input name="No_Graphi cs" type="radio" checked="checke d" />
I do not need any unique graphics designed.
(0 hours)</p>
<p><input name="Have_Grap hics" 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.& nbsp; (6
hours)</p>
<p><input name="Template_ Major" type="radio" /> I have a
template but it needs major custimzation.&n bsp; (10
hours)</p>
<p><input name="Custom_De sign" type="radio" /> I would
like a custom design created for my site. (20
hours) </p>
</fieldset>
<fieldset name="Other Graphics">
<legend class="alignlef t">Other Graphics</legend>
<p><input name="Need_Cust om_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.&nbs p; (4 hours)</p>
<p><input name="More_Stoc k" type="checkbox" /> I
need several stock photographs integrated.&nbs p; (9
hours)</p>
</fieldset>
<fieldset name="Flash">
<legend class="alignlef t">Flash</legend>
<p><input name="Flash_Men u" type="checkbox" /> I
need a flash menu. (6 hours)</p>
<p><input name="Flash_Ani mation" type="checkbox" /> I
need a short custom flash animation.  ; (3 hours)</p>
<p><input name="Total_Fla sh" 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_Ban ner" type="checkbox" /> I
need a flash banner. (4 hours)</p>
</fieldset>
<fieldset name="Content">
<legend class="alignlef t">Content</legend>
<p>
<input name="I_add_Con tent" type="radio" checked="checke d" />
I will add my content with a content manager. (0
hours)</p>
<p><input name="Content_P ages" 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="Copyright ing_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="alignlef t">Public Features</legend>
<p><input name="Member_Re gistration" type="checkbox" />
Member Registration&nb sp; (6 hours)</p>
<p><input name="Discussio n_Forum" type="checkbox" />
Discussion Forum (5 hours)</p>
<p><input name="Contact_F orm" type="checkbox" />
Contact Form ( 3 hours)</p>
<p><input name="Links_Pag e" type="checkbox" />
Links Page (3 hours)</p>
<p><input name="Site_Sear ch" type="checkbox" />
Site Search (4 hours)</p>
<p><input name="Auto-Responder" type="checkbox" />
Email Auto-responder (2 hours)</p>
<p><input name="File_Uplo ad" type="checkbox" />
File upload ( 8 hours)</p>
</fieldset>
<fieldset name="Ecommerce ">
<legend class="alignlef t">Ecommerce </legend>
<p><input name="Simple_Ca rt" 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_Ca rd" type="checkbox" />
Credit Card Processing  ; ( 4 hours)</p>
<p><input name="PayPal" type="checkbox" />
PayPal processing</p>
</fieldset>
<fieldset name="Admin_Fea tures">
<legend class="alignlef t">Admin Features</legend>
<p><input name="Blog" type="checkbox" /> Off
the shelf Blog (3 hours)</p>
<p><input name="Custom_Bl og" type="checkbox" />
Custom Site Blog (6 hours)</p>
<p><input name="Photo_Gal lery" type="checkbox" />
Photo Gallery (6 hours)</p>
<p><input name="Member_Ad min" type="checkbox" />
Member Administration& nbsp; (5 hours)</p>
<p><input name="Site_Stat istics" type="checkbox" />
Site Statistics (1 hour)</p>
</fieldset>
<fieldset name="SEO">
<legend class="alignlef t">SEO</legend>
<p><input name="MetaTag" type="checkbox" />
MetaTag Keyword Optimization (5 hours)</p>
<p><input name="Search_En gine_Submission " type="checkbox" />
Search Engine Submission (3 hours)</p>
<p><input name="Link_Buil ding" type="checkbox" />
Minor Link Building (6 hours)</p>
</fieldset>
<br />
<input name="Calculate _Cost" type="button" value="Calculat e Cost" /></form>[/HTML]
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="alignlef t">General</legend>
<p>
<input name="Have_Site " type="radio" checked="checke d" />
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="alignlef t">Site Layout</legend>
<p>
<input name="No_Graphi cs" type="radio" checked="checke d" />
I do not need any unique graphics designed.
(0 hours)</p>
<p><input name="Have_Grap hics" 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.& nbsp; (6
hours)</p>
<p><input name="Template_ Major" type="radio" /> I have a
template but it needs major custimzation.&n bsp; (10
hours)</p>
<p><input name="Custom_De sign" type="radio" /> I would
like a custom design created for my site. (20
hours) </p>
</fieldset>
<fieldset name="Other Graphics">
<legend class="alignlef t">Other Graphics</legend>
<p><input name="Need_Cust om_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.&nbs p; (4 hours)</p>
<p><input name="More_Stoc k" type="checkbox" /> I
need several stock photographs integrated.&nbs p; (9
hours)</p>
</fieldset>
<fieldset name="Flash">
<legend class="alignlef t">Flash</legend>
<p><input name="Flash_Men u" type="checkbox" /> I
need a flash menu. (6 hours)</p>
<p><input name="Flash_Ani mation" type="checkbox" /> I
need a short custom flash animation.  ; (3 hours)</p>
<p><input name="Total_Fla sh" 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_Ban ner" type="checkbox" /> I
need a flash banner. (4 hours)</p>
</fieldset>
<fieldset name="Content">
<legend class="alignlef t">Content</legend>
<p>
<input name="I_add_Con tent" type="radio" checked="checke d" />
I will add my content with a content manager. (0
hours)</p>
<p><input name="Content_P ages" 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="Copyright ing_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="alignlef t">Public Features</legend>
<p><input name="Member_Re gistration" type="checkbox" />
Member Registration&nb sp; (6 hours)</p>
<p><input name="Discussio n_Forum" type="checkbox" />
Discussion Forum (5 hours)</p>
<p><input name="Contact_F orm" type="checkbox" />
Contact Form ( 3 hours)</p>
<p><input name="Links_Pag e" type="checkbox" />
Links Page (3 hours)</p>
<p><input name="Site_Sear ch" type="checkbox" />
Site Search (4 hours)</p>
<p><input name="Auto-Responder" type="checkbox" />
Email Auto-responder (2 hours)</p>
<p><input name="File_Uplo ad" type="checkbox" />
File upload ( 8 hours)</p>
</fieldset>
<fieldset name="Ecommerce ">
<legend class="alignlef t">Ecommerce </legend>
<p><input name="Simple_Ca rt" 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_Ca rd" type="checkbox" />
Credit Card Processing  ; ( 4 hours)</p>
<p><input name="PayPal" type="checkbox" />
PayPal processing</p>
</fieldset>
<fieldset name="Admin_Fea tures">
<legend class="alignlef t">Admin Features</legend>
<p><input name="Blog" type="checkbox" /> Off
the shelf Blog (3 hours)</p>
<p><input name="Custom_Bl og" type="checkbox" />
Custom Site Blog (6 hours)</p>
<p><input name="Photo_Gal lery" type="checkbox" />
Photo Gallery (6 hours)</p>
<p><input name="Member_Ad min" type="checkbox" />
Member Administration& nbsp; (5 hours)</p>
<p><input name="Site_Stat istics" type="checkbox" />
Site Statistics (1 hour)</p>
</fieldset>
<fieldset name="SEO">
<legend class="alignlef t">SEO</legend>
<p><input name="MetaTag" type="checkbox" />
MetaTag Keyword Optimization (5 hours)</p>
<p><input name="Search_En gine_Submission " type="checkbox" />
Search Engine Submission (3 hours)</p>
<p><input name="Link_Buil ding" type="checkbox" />
Minor Link Building (6 hours)</p>
</fieldset>
<br />
<input name="Calculate _Cost" type="button" value="Calculat e Cost" /></form>[/HTML]
Comment