I have a drop-down where users can select a couple of options. Can I get the option value right away and process an action without a submit button?
Example, a drop-down that has the option delete for a photo. As soon as a person selects delete in that list it will delete the photo.
Can I test the $_POST[‘delete’] and delete the photo?
Thanks!
You can with JavaScript and AJAX. Otherwise you need to use a regular old POST with a submit button.
It is possible to force a form submit with JavaScript, as if the button had been pressed, but this is not good for usability.