I’ve been getting to grips with the basics of AJAX and PHP using this code W3Schools – PHP & AJAX Database. Would it be possible to add selected=”selected” to one of the options and then have the ajax call to the PHP file as the page loads, rather than onchange? But obviously I’d still like the other options to load when selected.
Thanks
Of course, you can use the body’s
onLoadevent to trigger whatever you want. Completely valid next to anonChangeevent on the<select>.