Jump to content

jquery onchange?


snowdog

Recommended Posts

so here is exactly what I want to do. Maybe the oncghange is not the right thing. When they select USA, it populates the option boxes with the states and if they pick Canada it populates the provinces into the option.

<p>
                    	<label for="name">Franchise Country</label>
                        <input type="text" name="f_country"  class="sf" />
                    </p>

				<p>
                    	<label for="State/Prov">State</label>
                        <select name="f_state_prov">
                              <option>Choose One</option>
                              <option value="AL">Alabama</option>
		      <option value="AK">Alaska</option>
	 	      <option value="AZ">Arizona</option>
		      <option value="AR">Arkansas</option>
		      <option value="CA">California</option>
                         </select>

                                   <label for="State/Prov">Province</label>
                                        <select name="f_state_prov">
                                                  <option value="AB">Alberta</option>
					  <option value="BC">British Columbia</option>
					  <option value="MB">Manitoba</option>
					  <option value="NB">New Brunswick</option>
					  <option value="NF">New Foundland</option>
					  <option value="NT">Northwest Territories</option>
					  <option value="NS">Nova Scotia</option>
					  <option value="NT">Nunavut</option>
					  <option value="ON">Ontario</option>
					  <option value="PI">Prince Edward Island</option>
					  <option value="PQ">Quebec</option>
					  <option value="SA">Saskatchewan</option>
					  <option value="YT">Yukon Territory</option>
                                    </select>

Link to comment
Share on other sites

unfortunetly yes, This is my first crack at jquery and am having trouble understanding it. I understand logic flow but am having trouble with this. I have been following the examples on the jquery website and don't understand how it will know which option values to load when you change the country in the previous drop down box.

 

 

James

 

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.