PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, September 8, 2022

[FIXED] How to call a function after textbox lose focus

 September 08, 2022     ajax, focus, function, javascript, textbox     No comments   

Issue

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.

I'm displaying a table in my page (using PHP) with text boxes that contains the same values of a table on my DB, and when someone change the value on a text box I want to change the DB table with an UPDATE query to make them equals; is that a way with AJAX or JQuery to do this?


Solution

<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>


Answered By - Sibu
Answer Checked By - Cary Denson (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing