By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,667 Members | 2,084 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,667 IT Pros & Developers. It's quick & easy.

Seeking to defeat auto-fill

P: n/a
Is there some parameter I can set via Javascript that will
cause the browser to *not* auto-fill forms, regardless of
the browser settings???

--
+----------------------------------------------------------------+
| Charles and Francis Richmond richmond at plano dot net |
+----------------------------------------------------------------+
Nov 4 '08 #1
Share this Question
Share on Google+
10 Replies


P: n/a
On Nov 4, 7:15*am, Charles Richmond <friz...@tx.rr.comwrote:
Is there some parameter I can set via Javascript that will
cause the browser to *not* auto-fill forms, regardless of
the browser settings???
Buid the form dynamically, and use weird field names with a random
part, such as name_675sd4Y. Then strip the random part at the server
side. ISTM this may work.

javascript:alert("_"+(Math.floor(1e8*Math.random() )).toString(36))

--
Joprge.
Nov 4 '08 #2

P: n/a
Charles Richmond wrote:
Is there some parameter I can set via Javascript that will
cause the browser to *not* auto-fill forms, regardless of
the browser settings???
You can disable autocomplete on a form with:

<form autocomplete='off' ...>

or an element:-

<input autocomplete='off' >

See
http://msdn.microsoft.com/en-us/libr...8VS.85%29.aspx

Google: "How to Turn Off Form Autocompletion"
Yeilds:-
https://developer.mozilla.org/En/How...Autocompletion
--
comp.lang.javascript FAQ <URL: http://jibbering.com/faq/ >
Nov 4 '08 #3

P: n/a
On Nov 4, 8:44*am, Jorge <jo...@jorgechamorro.comwrote:
On Nov 4, 7:15*am, Charles Richmond <friz...@tx.rr.comwrote:
Is there some parameter I can set via Javascript that will
cause the browser to *not* auto-fill forms, regardless of
the browser settings???

Buid the form dynamically, and use weird field names with a random
part, such as name_675sd4Y. Then strip the random part at the server
side. ISTM this may work.

javascript:alert("_"+(Math.floor(1e8*Math.random() )).toString(36))
Forget it. This ^^^ doesn't do it:

<https://developer.mozilla.org/En/
How_to_Turn_Off_Form_Autocompletion: "Note that variants of key
words such as "Name1", "Address2" will also trigger the prompt."

What dhtml has told you is the right thing.

--
Jorge.
Nov 4 '08 #4

P: n/a
On Tue, 04 Nov 2008 00:15:11 -0600, Charles Richmond wrote:
Is there some parameter I can set via Javascript that will cause the
browser to *not* auto-fill forms, regardless of the browser settings???
Why would you hinder the users of such a form?
--
Matthias
/"\
\ / ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
X - AGAINST M$ ATTACHMENTS
/ \
Nov 4 '08 #5

P: n/a
On Tue, 04 Nov 2008 00:03:29 -0800, dhtml wrote:
Charles Richmond wrote:
>Is there some parameter I can set via Javascript that will cause the
browser to *not* auto-fill forms, regardless of the browser settings???

You can disable autocomplete on a form with:

<form autocomplete='off' ...>
Which DTD allows such a tag attribute?
--
Matthias
/"\
\ / ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
X - AGAINST M$ ATTACHMENTS
/ \
Nov 4 '08 #6

P: n/a
Matthias Watermann meinte:
On Tue, 04 Nov 2008 00:15:11 -0600, Charles Richmond wrote:
>Is there some parameter I can set via Javascript that will cause the
browser to *not* auto-fill forms, regardless of the browser settings???

Why would you hinder the users of such a form?

It interferes with the popular XHR driven suggest widgets.

Gregor
Nov 4 '08 #7

P: n/a
Matthias Watermann wrote:
On Tue, 04 Nov 2008 00:03:29 -0800, dhtml wrote:
>Charles Richmond wrote:
>>Is there some parameter I can set via Javascript that will cause the
browser to *not* auto-fill forms, regardless of the browser settings???

You can disable autocomplete on a form with:

<form autocomplete='off' ...>

Which DTD allows such a tag attribute?
No standardized one, so that's bad advice indeed. However, it might be
possible to set a corresponding property of the corresponding element
object in a suitable place instead.
PointedEars
--
Use any version of Microsoft Frontpage to create your site.
(This won't prevent people from viewing your source, but no one
will want to steal it.)
-- from <http://www.vortex-webdesign.com/help/hidesource.htm>
Nov 4 '08 #8

P: n/a
Thomas 'PointedEars' Lahn wrote:
Matthias Watermann wrote:
>On Tue, 04 Nov 2008 00:03:29 -0800, dhtml wrote:
>>Charles Richmond wrote:
Is there some parameter I can set via Javascript that will cause the
browser to *not* auto-fill forms, regardless of the browser settings???
You can disable autocomplete on a form with:

<form autocomplete='off' ...>
Which DTD allows such a tag attribute?

No standardized one, so that's bad advice indeed.
It gets the job done. Browsers that don't handle autocomplete will
ignore it.

However, it might be
possible to set a corresponding property of the corresponding element
object in a suitable place instead.

The ajax form's autocomplete property set to "off"

form.autocomplete = "off".

--
comp.lang.javascript FAQ <URL: http://jibbering.com/faq/ >
Nov 5 '08 #9

P: n/a
Matthias Watermann wrote:
On Tue, 04 Nov 2008 00:15:11 -0600, Charles Richmond wrote:
>Is there some parameter I can set via Javascript that will cause the
browser to *not* auto-fill forms, regardless of the browser settings???

Why would you hinder the users of such a form?
The fields I want to disable auto-complete... only accept
numbers from 1 to 31. Auto-complete becomes more of a distraction
than a help here.
--
+----------------------------------------------------------------+
| Charles and Francis Richmond richmond at plano dot net |
+----------------------------------------------------------------+
Nov 5 '08 #10

P: n/a
dhtml wrote:
Thomas 'PointedEars' Lahn wrote:
>Matthias Watermann wrote:
>>On Tue, 04 Nov 2008 00:03:29 -0800, dhtml wrote:
Charles Richmond wrote:
Is there some parameter I can set via Javascript that will cause the
browser to *not* auto-fill forms, regardless of the browser settings???
You can disable autocomplete on a form with:

<form autocomplete='off' ...>
Which DTD allows such a tag attribute?
No standardized one, so that's bad advice indeed.

It gets the job done. Browsers that don't handle autocomplete will
ignore it.
That's inexperience talking; you just can't know that.
However, it might be
>possible to set a corresponding property of the corresponding element
object in a suitable place instead.

The ajax form's autocomplete property set to "off"

form.autocomplete = "off".
Yes, that's what I meant.
PointedEars
--
Use any version of Microsoft Frontpage to create your site.
(This won't prevent people from viewing your source, but no one
will want to steal it.)
-- from <http://www.vortex-webdesign.com/help/hidesource.htm>
Nov 5 '08 #11

This discussion thread is closed

Replies have been disabled for this discussion.