Password masking as in mobiles using js - javascript

Can any one suggest to build a password field that behaves the way passwords are entered using iphone?
When I enter some character, it should be visible to the user for a second and then it should turn to *. But I need to get the value from the field when I submit the form.
Its an ExtJs text field. Is there any plugins available for this? Any help on this will be helpful.

Probably, this can help you:
http://blog.decaf.de/2009/07/iphone-like-password-fields-using-jquery/

Check out this Fiddle
Change textfield to stars like iPhone
Note: this solution is NOT complete and NOT optimal, for example you will have to handle Delete and Backspace buttons manually. You might find some plugin to do it in other way, but this is the simplest way to do it JavaScript I guess.

Related

auto complete off is not working on edge browser

I am trying to submit the form but It won't. It is auto-fill the input area after submitting once. However, after auto-fill the input it does not enable the submit button.
As it works on the rest of the browsers.
I have tried to add autocomplete off attribute in form tag as well as input tag but no luck.
<form autocomplete="off" ....````
This works, but not the way that you think it does.
Officially it should be: autocomplete="off".
However many browsers bizarrely ignore this. Therefore it's best to just put some random string on the autocomplete section like:
autocomplete="autocomplete_off_randString"
Note that make sure the autocomplete value for each input is different (use JavaScript). Hence the random string at the end. Or else you may get suggestions from fields with the same autocomplete value.
in edge worked for me autocomplete="false" readonly onfocus="this.removeAttribute('readonly');" / according to this https://stackoverflow.com/a/30344707/14913109
try to use autocomplete="new-password"as describe here

jquery- manipulating ctrl-z and ctrl-y with textarea

When im writing on chrome for example (got to work on all browsers) on the textarea in my site, and im pressing CTRL+Z, its deleting everything i wrote until the last "/n". Is there any way that i could make javascript save texts, so when a user will press CTRL+Z its will go to the last point when javascript saved the data?
For example, i would love to save the data every time a user click on backspace or a button that changes the textarea. its preety similar to the undo, redo buttons on stackoverflow.
Some kind of a string list isnt good for me, im looking for a built javascript/jquery way of doing that, if there is any.
You can have a look in this library
http://dmauro.github.io/Keypress/
It's allow you to detect all input, so basically you can store it on any letter typed, or at least save the text in the textarea everytime a special key is pressed.
It's also really easy to detect combo.
Hope that's help

Javascript - Masking a password on a JS alert box

I have the following
var validate=prompt("Enter your PIN","Enter your PIN");
This works fine except it shows the password when typing it.
Is there any way to mask the password being entered?
Cheers,
Nope, there is no way to mask prompt box. You will have to use some other custom solution or use password input box instead.
If you want to do validation of password, do it on the server-side not client-side.
If you really want a prompt window and accept a password, you might want to use this plugin along with jquery. Check out example 9 on http://trentrichardson.com/Impromptu/index.php and use type="password" instead.
It's impossible to hide the password.JS load on the client side.
We can easily find the password by checking the source code.
Here is an example. Check it out yourself
http://www.pageresource.com/jscript/jpass.htm

JavaScript numbers only script (without blocking keyboard shortcuts)

I have a script in a web application of mine which forces users to type only numbers into certain text fields. However, when the appropriate text field is selected, the script blocks ANY keyboard input other than number keys and tab. I don't want to limit the user from being able to use their browser's or my app's keyboard shortcuts just because they are typing in a numerical field. (Also, I'd rather not just validate the field instead of preventing number input, my app updates the page based on the numerical input live, so it wouldn't be as nice.)
Can someone please help write/find a little script for me? A simple variation of these numbers-only scripts that can be overrided when a modifier key is pressed is enough (and I guess the overrided character would have to be deleted, too).
I'm not going to write a script for you, but I'll give you some pseudo-pseudo-code:
input = input.replace(/\D/, '');
Try YAV, Javascript validator library.
I think you need mask feature.
Look at field Custom: from this example
http://yav.sourceforge.net/en/example_7.html

Ideas on limit the text on textfield?

for example, I want the textfield input number only. my idea is when the user typing, it will call a javascript to check whether it is valid, if it is not valid, I delete the text which is just entered. But I think it is very complex to do so. Is there any simple way to do so?
Put a validation on submit.
JQuery Masking could be a good choice: http://digitalbush.com/projects/masked-input-plugin/
The script to do this is here. It's a pretty common requirement.
http://javascript.internet.com/forms/validate-numeric-only.html
I think, like o.k.w said, jQuery Masking would be a good choice because of 2 things:
jQuery is solid and fast
Masking is more user friendly than just deleting user input on the fly without any notification. Masking gives them a graphical reference of what type of input is expected and what the input might look like.

Categories

Resources