Windows.location
Windows.location
I'm having trouble getting the condition to work correctly and load the correct page. No pages are loading and no error is given
- <script>
- $(document).ready(function() {
- $("#app_type").submit(function() {
- var selrange = $("select#range").val();
- var selplace = $("select#place").val();
- var selindustry = $("select#industry").val();
-
- if (selrange == '1') {
- if (selplace == "1") {
- window.location = "application_us_short.php";
- } else {
- window.location = "application_ca_short.php";
- }
- }
- if ((selrange == '2') && (selindustry == '2' || selindustry == '10')) {
- if (selplace == "1") {
- window.location = "application_us_short.php";
- } else {
- window.location = "application_ca_short.php";
- }
- if ((selrange == '2') && (selindustry != '2' || selindustry != '10') || (selrange = '3')) {
- if (selplace == "1") {
- window.location = "application.php";
- } else {
- window.location = "application_ca.php";
- }
- }
- });
- });
- </script>
-
- <div style="margin: 0 auto; text-align: center; margin-top: 60px">
- <form id="app_type">
- <h4>What country are you located in?</h4>
- <select id="place" name="place">
- <option value="1">United States</option>
- <option value="2">Canada</option>
- </select>
-
- <h4>What industry is your company most closely associated with?</h4>
- <select id="industry" name="industry">
- <option value="1">Agriculture</option>
- <option value="2">Consumer Electronics & Appliances</option>
- <option value="3">Construction/Industrial</option>
- <option value="4">Manufactured Housing</option>
- <option value="5">Marine</option>
- <option value="6">Music</option>
- <option value="7">Outdoor Power Equipment</option>
- <option value="8">Power Sports</option>
- <option value="9">Recreational Vehicles</option>
- <option value="10">Technology</option>
- <option value="11">Trailer</option>
- </select>
-
- <h4>What credit line range are you applying for?</h4>
- <select id="range" name="range">
- <option value="1">Less than $150,000</option>
- <option value="2">$150,001-$350,000</option>
- <option value="3">$350,000+</option>
- </select>
- <hr>
- <input type="submit" value="Submit" id="process_app" />
- </form>
- </div>