How To Pass The Value Of A Form Select Input To A Php File Using Ajax Without Submitting It? September 28, 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 JugaFullpage Js Animation On SectionHow To Dynamically Enable/disable Responsive ExtensionStarting Jquery Fadetoggle Hidden$(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 postsDocumenting Callback Parameters Using Google Closure CompilerHaving Trouble Rendering Javascript In RailsLow Image Quality In Safari, Jssor Slider Is UsedHow To Add A Close Icon In Bootstrap Tabs? 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?"