Reputation: 61
I'd like to make a button on a view page that changes an attribute in my database. I know how to do it via a form (but we don't want to do that) and I have used a convoluted ajax method to do it (which is just overly complicated), but it seems like there has got to be a better way.
Upvotes: 0
Views: 54
Reputation: 7985
Nope (to a better way).
Q: How do you change a value in the database?
A: You have to send a[n] HTTP request to your server.
What are your options for sending HTTP requests to a server?
You could write your own Javascript to do the "AJAX", or your would just use what's already out there.
Upvotes: 1