Click to See Complete Forum and Search --> : Clear a field after back button is clicked


ugaMack
11-07-2003, 02:31 PM
I don't know if this is even possible, but here is my problem.

I'm putting together a form that asks for a credit card number. Right now, if a person submits the form and goes to the confirmation/thank you page and isn't smart enough to quit the browser, another person could walk up to the computer, click the back button on the browser and get all of the credit card info.

I've written a function that clears the field onLoad and even tried putting the function call into the flow of the page. I've also put all the no-cache meta tags in. The function works if I hit refresh on the page, but not if the back button is hit.

Any ideas?

Thanks

KeithMcL
11-07-2003, 09:22 PM
Do you have it setup with the input field displaying the actual numbers of the CC? It might be better to change it to a password field. That should sort the problem. It just means the person won't see the characters being typed in.

You could use the confirmation page to display the cc number to make sure it's correct.

ugaMack
11-09-2003, 08:07 PM
Yeah, I thought about that, but it seemed like it wouldn't be very user friendly to type in a 12 or so digit number without being able to see what you've typed.

Is this a common way of doing things?

KeithMcL
11-10-2003, 06:56 PM
From what I can remember all of the sites I've ever put my cc details into I've always been able to see what I'm typing. I've never thought of checking if pressing the back button will show my cc details. I've always just closed the browser window once done.

Maybe you should look at other sites that do this to get an idea of how they do it.

cclib
08-31-2007, 01:30 PM
Does anyone have a solution for this? (Clearing a field on refresh or back button click.) I have quick search box for a library catalog. After the search runs a subsequent user could hit the back button and see the search. Certainly not a huge problem, but it would be nice to clear the field for them. I thought this would be simply, but based on the previous replies to this thread perhaps it is more complicated.

Here's what I'm working with: <input type="text" maxlength="255" size="11" name="searchdata1" value="Quick Search" onfocus="if(this.value==this.defaultValue){this.value='';this.style.color='#000';};" onblur="if(this.value==''){this.value=this.defaultValue;this.style.color='#808080';}" style="color: #808080">

Thanks!