Results 1 to 6 of 6
Feb 9, 2012, 15:08 #1
- Join Date
- Feb 2004
- Winnipeg Canada
- 0 Post(s)
- 0 Thread(s)
Setting the Value of a text box based on the value of a Select Box
Here is what I need to do.
1: I have a select box of CND Provinces, the value of each is the ISO two character code (eg: MB, AB, BC, etc...)
2: Each province needs a different numerical tax value.
3: When I change the select box, I want the correct value for that province to appear in a text box.
In the example below, I know I need to write a function called "setTax" but I do not know where to begin.
If AB is chosen, the value has be be 5
If ON is chosen, the value has to be 13
If BC is chosen, the value has be to 12
Here is a sample of my select box
<select name="province" onchange="setTax(document.Form, this.value);">
<option value="">Select Province from List...</option>
<option value="BC">British Columbia</option>
Here is my text box
<input name="showtax" type="text" id="showtax" value="<show-value-of-tax-here" />
Any help would be appricated!