0
   

javascript calculation form

 
 
Reply Tue 16 Apr, 2013 12:34 pm
m total newb in java script and i want to make a script that will calculate and show automaticaly a final price when i choose from the drop down menus.

For example check the form i have make here:
<form action="" id="orderform" onsubmit="return false;">
<div>
<div class="cont_order">
<fieldset>
<label >League</label>

<select id="cleague" name='cleague' onchange="">
<option value="None">Select League</option>
<option value="Bronze">Bronze</option>
<option value="Silver">Silver</option>
<option value="Gold">Gold</option>
<option value="Platinum">Platinum</option>
<option value="Challenger">Diamond</option>

</select>


<label >Division</label>

<select id="cdivision" name='cdivision' onchange="">
<option value="None">Select Division</option>
<option value="I">I</option>
<option value="II">II</option>
<option value="III">III</option>
<option value="IV">IV</option>
<option value="V">V</option>


</select>
<br/>

<div id="totalPrice"></div>

</fieldset>
</div>


<div>
<div class="cont_order">
<fieldset>

<label >League</label>

<select id="dleague" name='dleague' onchange="">
<option value="None">Select League</option>
<option value="Bronze">Bronze</option>
<option value="Silver">Silver</option>
<option value="Gold">Gold</option>
<option value="Platinum">Platinum</option>
<option value="Challenger">Diamond</option>

</select>


<label >Division</label>

<select id="dessireddivision" name='desireddivision' onchange="">
<option value="None">Select Division</option>
<option value="I">I</option>
<option value="II">II</option>
<option value="III">III</option>
<option value="IV">IV</option>
<option value="V">V</option>


</select>
<br/>

<div id="totalPrice"></div>

</fieldset>
</div>

<input type='submit' id='submit' value='Submit' onclick="" />
</div>
</form>

From the current league menu user picks the current league: For example bronze( 1,2,3,4,5 ).

Then on desired league user picks for example platinum gold silver or diamond (1,2,3,4,5). So i want to show a price based on the desired division of desired league.

I need to have fixed prices on desired divisions of the desired leagues but when a user picks a current division and a current league that is near to the desired league and division the price will be decreased by a % or a nubmer i give inside the script. and the price will be shown down automaticaly

Anyone knows how to make this ? or help me ?
  • Topic Stats
  • Top Replies
  • Link to this Topic
Type: Question • Score: 0 • Views: 661 • Replies: 0
No top replies

 
 

Related Topics

Clone of Micosoft Office - Question by Advocate
Do You Turn Off Your Computer at Night? - Discussion by Phoenix32890
The "Death" of the Computer Mouse - Discussion by Phoenix32890
Windows 10... - Discussion by Region Philbis
Surface Pro 3: What do you think? - Question by neologist
Windows 8 tips thread - Discussion by Wilso
GOOGLE CHROME - Question by Setanta
.Net and Firefox... - Discussion by gungasnake
Hacking a computer and remote access - Discussion by trying2learn
 
  1. Forums
  2. » javascript calculation form
Copyright © 2024 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.04 seconds on 05/10/2024 at 04:40:53