0

I would like to create a form in html/css/jquery whereby when a correct password (password is there for gimmicky reasons - not security) is entered, the submit button to a mailchimp form is activated - without clicking a button.

2
  • you could try making an ajax request with just the username/password but dont know why you want that and make an icon when success returned Commented Aug 18, 2015 at 19:05
  • There's no username. It's an access code - and as it's not important that its secure - I wanted to avoid learning ajax (started coding a few months ago) Commented Aug 18, 2015 at 19:07

1 Answer 1

0

Without posting anything you have tried, I would suggest you try using jquery keyup to check if the input password is correct. If so, run your bit of code. Else, you can give them an error message.

https://jsfiddle.net/cshanno/tdzL7y2k/

HTML

<input id='password' type='text' /> <span id='validPassword'></span>

JQUERY

$('#password').keyup(function(){
    if($(this).val() === "password") {
        $('#validPassword').text('Correct'); // do action here
    } else {
        $('#validPassword').text('Incorrect');
    }
});
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.