codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Urgent !!! how to create a input field of type partially password and partially te  balu_xinthe at 08:55 on Tuesday, March 30, 2004
 

Hi

I want to create an input field in jsp page such that it displays * for the first 10 characters and display the typed characters for the next 4 characters.But the typed 14 characters must be stored for further processing.i want to use it in credit card program








  Re: Urgent !!! how to create a input field of type partially password and partially te  Troy Wolf at 15:12 on Tuesday, March 30, 2004
 

My advice is to stick to the standard -- have a regular text element where the user enters the credit card number. When they submit the form, you'll have the full credit card number. From then on, whenever you display the card # back to the user or send it to them on printed documents, use a mask to hide all but the last four digits.

In ecommerce systems I've built before, I NEVER even stored the full number. I used the full number to authorize the card, but I only stored the first and last four digits in my database. This way there was no way somebody could hack my database to steal credit card numbers. I was 100% sure because I did not have the numbers in my database. Your needs may be different.

You are thinking that you want to protect the user when entering their card number from people who may be standing around--right? Hiding the card number during entry will make it very difficult for many people to enter their number because they don't have it memorized. That works for passwords because most people can type their password without looking. If a user feels it is not safe to momentarily enter their card number on a web page, then they probably don't feel safe to even pull their card out to look at the number so they can enter it in the first place.

There are tricks you could do to try to simulate the effect you asked for, but you'd probably end up with something that does not work in all browsers, and would still not work exactly as desired. I played with this for an hour and came up with something close--but not good enough for production use.
Troy Wolf: site expert
Shiny Solutions









CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Testing file for type of data
•  Running VB6 application as a ASP.NET application
•  login system with asp.net
•  Re: Help: Trouble with z-Index and SELECT lists
•  What is wrong with this ASP codes? It don`t seem to work???
•  Need help with ListBox control
•  Re: Good Javascript/DHTML Reference
•  Re: scrolling table
•  Re: simulation of road traffic


Recent Articles
Communicating with the Database (Using ADO)
MagicGrid
Simple Thumbnail Browsing Solution
Type Anywhere
A Better Moustrap: FmtDate to replace FormatDateTime
ASP.NET Forum Source Code
Internal Search Engine
Javascript Growing Window
Simple date validation
Search engine friendly URLs using ASP.NET (C#.NET)


Site Survey
Help us serve you better. Take a five minute survey. Click here!

© Copyright codetoad.com 2001-2004