How can I use javascript to check, if the user clicks out of my text input class = "foo", and then, if the user has done so, execute a php file.
How can I use javascript to check, if the user clicks out of my
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The easiest way to go about doing this, is to use jQuery.
First, include jQuery in your
<head></head>section:Then add in the following Javascript:
This will setup the
input(who’s class isfoo) to use ajax to runmyScript.phpwhenever someone clicks out of it, which in development terms is called blurring.