jQuery made it really simple to submit the form without navigating away from the form page. In fact, my script works alongside it with minor modifications, so if you use the following code to stop the form from submitting normally, the script should work on it's own.

$("#formid").submit(function(event) {
/* stop form from submitting normally */
$.post("sendmessage.php", { ime: $("#name").val(), email: $("#email").val(), message: $("#message").val() },
function(data) {
/* Display results in a div with an id of `result` */ $( "#result" ).empty().append( data );
/* Hide NPPCaptcha after submit */

I've added a div with an id of `result` to display the form submit results, and i've added two lines that hide NPPCaptcha divs after submitting.

NPPCaptcha features

1. Different types

There are two types of NPPCaptcha, you choose which one you'd like.

2. Difficulty levels

You can choose how many numbers the user must arrange before the form is submitted.

3. Flexibility

Invoke the display function just the way you like it. Call on it from another js function, like the one that might check the form inputs; Call on it after the user clicks an image - it's your choice.

Quick instructions

1. Include these files in the header

2. Place this html code anywhere in the page

3. Call the function when the user does something (clicks a button for example)

Button example.