File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Default value in fields Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSP
Reply Bookmark "Default value in fields" Watch "Default value in fields" New topic
Author

Default value in fields

Sky Seow
Greenhorn

Joined: May 23, 2011
Posts: 2
Hi, i am having this 'bug' when i tried to run my application using firefox browser. At my login page, the user will display a default value of '123' and password field will display a '*'. However, i did not even define a default value for both fields. I don't have this problem using IE though.
Sean Clark
Rancher

Joined: Jul 15, 2009
Posts: 377

Hey,

I don't think this is default values, I think this will just be firefox's password manager remembering a previous username/password that you have used.
If you clear all your user data in firefox it should clear and I think there are some options for stopping it remembering somewhere in the preferences.

Sean


I love this place!
Sky Seow
Greenhorn

Joined: May 23, 2011
Posts: 2
Is there a way to workaround this? Because i afraid it might confuse people if there are default values shown in the fields when rightfully there shouldn't have.
Vic Hood
Ranch Hand

Joined: Jan 05, 2011
Posts: 477

I believe Sean did suggest a 'workaround' to your problem.


Learning and Learning!-- Java all the way!
Sean Clark
Rancher

Joined: Jul 15, 2009
Posts: 377

Hey,

I don't think it a big deal, if the user wants to store their username/password within their browser then that should be up to them.
I think that you can however add: autocomplete="off" to the attributes of the input and this hints to the browser that it should not remember these. (I say hint because it is not part of the HTML spec, however I think it is recognised by most major browsers.)

Sean
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Default value in fields
 
Similar Threads
How to hide a particular field
Castor | Default Element Value
Struts layout:select
Data mapping problems ?
How to refer dynamically object fields by using EL