Forms have an action
attribute to specify where (for example a .php
file) to post to. Do <input>
elements have the action
attribute?
- The answer is most likely no. But I wish to know what concept am I getting wrong here?
- Is there a equivalent of
action
for<input>
? - The reason I am asking this is that I have a few checkboxes, and I wish to use AJAX to fire something to a PHP file, such that a
div
changes when the checkboxes are ticked (I don't want a whole page reload). How should I go about doing this?
I am still drafting the code at this stage, but an example can be seen here.
Appreciate your suggestions!