user1216129
user1216129

Reputation: 41

Java Server faces

i have two input texts named as password and confirm password. but in confirm password inputtext should not allow the paste content from the password input text. please give me good solution..

Thanks in Advance..

Upvotes: 0

Views: 147

Answers (2)

Jigar Joshi
Jigar Joshi

Reputation: 240860

You can use jQuery

$("#confirmPassword").bind('paste', function(e) {
    event.preventDefault();
      $("#confirmPassword").val("");
});

Upvotes: 1

sgowd
sgowd

Reputation: 2260

This should be done using JavaScript. There should be onpaste event. You can Google for it.

Upvotes: 0

Related Questions