I have no experience with Javascript/JQuery/AJAX so I\'m trying to understand if it\'s possible to call a function that execute a query on my DB after a textbox lose focus.
<input type="text" id="check">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript">
$("#check").blur(function() {
alert('working');
});
</script>
Bind a handler to the change
event:
<textarea onchange='ajax_call()'></textarea>
where ajax_call
is a function for updating the DB.
Yes, you can. First you need to wait for JavaScript event like onchange/onblur or other. Than you need to make an Ajax call to the server. It will change the data in db and can result some data, that you can put on the page. You can use jQuery to manipulate your page.
Another way is to wait until a person presses submit button and than update data in the db.