How To Pass The Value Of A Form Select Input To A Php File Using Ajax Without Submitting It? June 01, 2023 Post a Comment I want to pass the value of a form select input from an HTML form to a php file without submitting it. How may I do that? This is my form: Solution 1: You're almost there.Put the id attribute on the select and instead of the option. Baca JugaHow To Download File In Browser Using Spring Mvc?How To Put React Component Inside Html String?Validate And Filter Email Address With Regex?$(document).ready(function(){ $('#userDomicilioProvincia').change(function(){ $.ajax({ type: "POST", url: "/ubicacion.php", data: { provincia: $(this).val() } }); }); });Copy<scriptsrc="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script><divclass="form-group"><label>Provincia</label><selectid="userDomicilioProvincia"class="form-control"name="userDomicilioProvincia"><option></option><optionvalue="Capital Federal">Capital Federal</option><optionvalue="Gran Buenos Aires">Gran Buenos Aires</option><optionvalue="Buenos Aires">Provincia de Buenos Aires</option></select></div>Copy Share You may like these postsParallax Effect - Poor Performance On FirefoxWhat Does Webkitformboundary Mean?Make Sure First Ajax Function Finishes Before Second OneSmooth Scrolling Issue Post a Comment for "How To Pass The Value Of A Form Select Input To A Php File Using Ajax Without Submitting It?"
Post a Comment for "How To Pass The Value Of A Form Select Input To A Php File Using Ajax Without Submitting It?"