0

Is it possible to load a jquery function right after the user has completed a text input (not on form submission)?

This doesn't seem to work:

<?
if (isset($_POST['textinput'])) {echo "loadjqfunction()";}
?>

Thanks.

4
  • 2
    You are mixing server and client processing. What is telling you that a text input has been completed? Blur? $(function() { $("#textinput").on("blur",loadjqfunction) }); Commented Sep 2, 2013 at 13:28
  • Any idea how can I accomplish this in another way? Commented Sep 2, 2013 at 13:29
  • what do you mean/consider by "has completed a text input" ? a focus on next element or on the click of a button/link? Commented Sep 2, 2013 at 13:30
  • When the input value changes, I want to load a function. Commented Sep 2, 2013 at 13:36

1 Answer 1

2

This should be done entirely in Javascript:

$("#textinput").change(loadjqfunction);
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.