javascript - HTML form select with jQuery not working -
i using following code:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> <select name="cars" id="dynamic_select"> <option value="http://www.visionabacus.com/australia/1/suitea100/640/borrowing-power-calculator.aspx?id=mfaa">borrowing power calculator</option> <option value="http://www.visionabacus.com/australia/1/suitea100/640/loan-repayment-calculator.aspx?id=mfaa">loan repayment calculator</option> <option value="http://www.visionabacus.com/australia/1/suitea100/640/lump-sum-repayment-calculator.aspx?id=mfaa">lump sum repayment calculator</option> <option value="http://www.visionabacus.com/australia/1/suitea100/640/extra_repayment_calculator.aspx?id=mfaa">extra repayment calculator</option> <option value="http://www.visionabacus.com/australia/1/suitea100/640/budget-planner.aspx?id=mfaa">budget planner</option> <option value="http://www.visionabacus.com/australia/1/suitea100/640/loan-comparison-calculator.aspx?id=mfaa">loan comparison calculator</option> <option value="http://www.visionabacus.com/australia/1/suitea100/640/how-long-to-repay-calculator.aspx?id=mfaa">how long repay calculator</option> <option value="http://www.visionabacus.com/australia/1/suitea100/640/split-loan-calculator.aspx?id=mfaa">split loan calculator</option> <option value="http://www.visionabacus.com/australia/1/suitea100/640/property-selling-cost-calculator.aspx?id=mfaa">property selling cost calculator</option> <option value="http://www.visionabacus.com/australia/1/suitea100/640/property-buying-cost-calculator.aspx?id=mfaa">property buying cost calculator</option> <option value="http://www.visionabacus.com/australia/1/suitea100/640/saving-calculator.aspx?id=mfaa">saving calculator</option> <option value="http://www.visionabacus.com/australia/1/suitea100/640/term-deposit-calculator.aspx?id=mfaa">term deposit calculator</option> <option value="http://www.visionabacus.com/australia/1/suitea100/640/stamp-duty-calculator.aspx?id=mfaa">stamp duty calculator</option> <option value="http://www.visionabacus.com/australia/1/suitea100/640/credit-card-calculator.aspx?id=mfaa">credit card calculator</option> <option value="http://www.visionabacus.com/australia/1/suitea100/640/income-tax-calculator.aspx?id=mfaa">income tax calculator</option> <option value="http://www.visionabacus.com/australia/1/suitea100/640/reverse-mortgage-calculator.aspx?id=mfaa">reverse mortgage calculator</option> <option value="http://www.visionabacus.com/australia/1/suitea100/640/leasing-calculator.aspx?id=mfaa">leasing calculator</option> <option value="http://www.visionabacus.com/australia/1/suitea100/640/home-loan-offset-calculator.aspx?id=mfaa">home loan offset calculator</option> <option value="http://www.visionabacus.com/australia/1/suitea100/640/honeymoon-loan-calculator.aspx?id=mfaa">honeymoon loan calculator</option> <option value="http://www.visionabacus.com/australia/1/suitea100/640/comparison-rate-calculator.aspx?id=mfaa">comparison rate calculator</option> </select> <script> $(function() { // bind change event select $('#dynamic_select').on('change', function() { var url = $(this).val(); // selected value if (url) { // require url window.location = url; // redirect } return false; }); }); </script>
at moment, change of form sends browser url: http://www.visionabacus.com/default.aspx?go=
i don't understand needs change.
can please?
your code fine. links broken. if enter them manually see app on server side making redirection.
Comments
Post a Comment