How to secure SSN field while entering on a webform [closed] - javascript

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
When entering the SSN on the webform, I need the digit to appear for a couple of seconds and then have it go to an asterisk.
Is this possible? Please provide directions.

you can try something which is suggested here:
http://css-tricks.com/better-password-inputs-iphone-style/
there are 2 examples, one flashes the last digit entered, while keeping the textbox as asterisk. other example keeps everything as asterisk except the last digit.

The trick to this is changing the input type from text to password in the input's change event, with a setTimeout if needed. See this fiddle for a simple example using jquery.

Related

how to detect if a #hash tag is being entered in and input element [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
My question is simple:
How do I make the use of JavaScript regex to detect whether a #hashtag is being entered in the input element? I have a function to convert the hashtag into a clickable link but it's PHP. I want a similar function but in jQuery the reason is that if a hashtag is entered then I can send a value to the PHP processor form.
Sorry there is no code as I dont know much about JavaScript regex, also, I could not find any good tutorials.
You are looking for this: (#\w*)
function hasNonStandard(inputElem) {
return /[#\w*]/.test(inputElem.value);
}

Automatically detect and remove http:// from input using javascript [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
I have one/many HTML inputs that are to be used for URL entry
<input></input>
<input></input>
What I would like is: When an entry is made, then http:// is stripped from the beginning of that input. For example if http://google.com is entered then it becomes google.com in the input instead.
How does one go about achieving this with Javascript (or jQuery)? I haven't tried anything because I don't know where to begin. Pointers to documentation and/or examples would be greatly appreciated.
Get the value of the input and use regexp to replace http:// from the value.
$('input').change( function() {
var input = $('input');
input.val(
$('input').val().replace(/https?:\/\//gi,'')
);
});
DEMO
UPDATE
Xotic750 has a fiddle with 6 different methods for removing http://
http://jsfiddle.net/Xotic750/kyKsK/
I also updated my code to support the possibility of https:// as well.

select field works without button but it dont change in select field [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Closed 9 years ago.
Improve this question
I want to change content information of my website by selecting from select field. If I select any item my information be changed but in select field remain the same item all the time. please help me to keep selected item along with changing information.
Seems pretty straight forward to me.
Check out this fiddle. Hope this helps
Try logging the selectedIndex of the select option in your case.

Regex for domain name only [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I'm asking my users to write their domain name.
I'm looking for inputs of these types (=good):
http://www.Domain.com
http://Domain.com
https://www.Domain.com
https://Domain.com
www.Domain.com
Domain.com
http://no.matter.how.many.Domain.com
https://no.matter.how.many.Domain.com
no.matter.how.many.Domain.com
http://www.Domain.com/
https://www.Domain.com/
http://no.matter.how.many.Domain.com/
https://no.matter.how.many.Domain.com/
www.Domain.com/
Domain.com/
I'm want to reject any input that not in this format.
Bad inputs, for example:
http://www.Domain.com/page
http://www.Domain.com/page.html
http://www.Domain.com/page/page2
and so on...
Can you help me with a suitable RegEx?
Thank you!
You can use this regex
^(https?://)?[^/]+/?$
^depicts the start of string
$ depicts the end of string
? matches preceding group or char optionally..
Solution:
(https?://)?(www.)?([A-Za-z]+\.){1,}([A-Za-z]{2,})/?

how to escape special and non-english characters on key press? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
i want to ignore all special character but "-" and non-english characters on key press in jquery. Actually this input is used to check domain availability. like;
www.________.com | for and end extensions are already provided for user. they won't enter those parts.
can you help?
You should use a onChange event, since users can also paste something into the field.
To check if the string is a valid url, use this pattern
var urlPattern = /(http|ftp|https):\/\/[\w-]+(\.[\w-]+)+([\w.,#?^=%&:\/~+#-]*[\w#?^=%&\/~+#-])?/

Categories