Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Change form depending on what is selected.
Old 10-03-2009, 01:56 PM Change form depending on what is selected.
WebTraffic's Avatar
Extreme Talker

Posts: 225
Name: Brandon
Trades: 0
Hello guys,

I need some help with some javascript code. I'm a php programmer, but when it comes to javascript I am clueless.

This is what I am working on:

http://system-selector.ingramswatera...tem-calculator

What I need to do is whenever single speed furnace or variable speed furnace is selected from the heating type menu is display the words below it as "AFUE" with the field next to it defaulting as 80 and whenever heat pump is selected from the heating type menu "HSPF" needs to display with the field beside it defaulting as 6.8.

I have the calculations working properly, but it gets confusing when the user selects heat pump and then forgets to change the defaulted 80 to their HSPF.

This is what I am trying to accomplish:

http://www.hvacopcost.com/

Under Heating Standard, when Single Speed Furnace or Variable Speed Furnace is selected AFUE is shown. When Heat Pump is selected, HSPF is selected.
__________________

Please login or register to view this content. Registration is FREE

Coding is just like a woman. If you don't do something exactly right, it complains.
WebTraffic is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 10-03-2009, 03:16 PM Re: Change form depending on what is selected.
WebTraffic's Avatar
Extreme Talker

Posts: 225
Name: Brandon
Trades: 0
The form code looks like this, any help is appreciated.

Code:
<table border="0" cellspacing="0" cellpadding="0" width="80%" align="center">
<tbody>
<tr>
<td><form id="form1" action="http://system-selector.ingramswaterandair.com/index.php/geothermal-heat-pumps/calculator/79-calculated" method="post"> <label> </label>
<div>
<p align="center"><img src="images/zone_map.gif" border="0" alt="Zone Map" width="558" height="495" /><br /> Please Select Your Climate Zone using the map above:             <select id="zone" name="zone"> <option value="Zone 1">Zone 1</option> <option value="Zone 2">Zone 2</option> <option value="Zone 3">Zone 3</option> <option value="Zone 4">Zone 4</option> <option value="Zone 5">Zone 5</option> </select></p>
<p>Please Enter The Square Footage of your home:             <input id="squarefeet" name="squarefeet" type="text" /> Square Feet.</p>
<p>Cooling Type             <label> <select id="coolingtype" name="coolingtype"> <option value="ac">A/C</option> <option value="acvarspeed">A/C Variable Speed</option> </select> </label></p>
<p>Current Seer Rating             
  <select id="seerrating" name="seerrating"> <option selected="selected" value="8">8 Seer</option> <option value="10">10 Seer</option> <option value="12">12 Seer</option> <option value="13">13 Seer</option> <option value="14">14 Seer</option> <option value="15">15 Seer</option> <option value="16">16 Seer</option> <option value="18">18 Seer</option> </select></p>
<p>
  <label></label>
Heating Type             
<select id="heatingtype" name="heatingtype"> 
  <option value="singlespeedfurnace">Single Speed Furnace</option> 
  <option value="varspeedfurnace">Variable Speed Furnace</option> 
  <option value="heatpump">Heat Pump</option> 
  <option value="electricheat">Electric Heat</option>
</select>
</p>
<p>
  <label>Current AFUE or HSPF </label>
  <input id="afue" name="afue" size="1" type="text" value="80" />
  <br>
Gas Furnace Efficiency is rated in AFUE, Heat Pump Efficiency is rated in HSPF. </p>
<p>Electric Rate             <input id="electricrate" name="electricrate" size="2" type="text" value="15.5" /> cts/kWhr<br /> <span class="style1">To get this, divide your monthly bill ($) by by the total usage (kWhrs)</span></p>
<p>Gas Rate             <input id="gasrate" name="gasrate" size="2" type="text" value="107" /> cts/therm<br /> <span class="style1">To get this, divide your monthly bill ($) by by the total usage (therms)</span></p>
<p><label></label> <label> <input id="Calculate" name="Calculate" type="submit" value="Calculate" /> </label></p>
</div>
<p><label></label></p>
<label></label>
<p> </p>
</form></td>
</tr>
</tbody>
</table>
<!-- .style1 {font-size: 10px} -->
__________________

Please login or register to view this content. Registration is FREE

Coding is just like a woman. If you don't do something exactly right, it complains.
WebTraffic is offline
Reply With Quote
View Public Profile
 
Old 10-05-2009, 04:23 AM Re: Change form depending on what is selected.
Junior Talker

Posts: 1
Trades: 0
I have read your topic. What's useful innformation for my job.
I do agree with you. Those are the most effective way
have a blessed day
__________________

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE
phoistqua is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Change form depending on what is selected.
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.11655 seconds with 12 queries