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

howto hidding/overriding history dropdown list of a textbox ?

P: n/a
Hi!

If the subject isn't clear:

Modern browsers provide an optional way of remembering user input in
textbox: user begin to type, and a list drop down just under the
textbox showing matching strings already typed.

I just want to provide my own droplist.

Is there an already existing component/script somewhere, and if not,
is there a way of either:
- place some div that cover that builtin list
- feed the builtins list with my own values

Thanks for any help or pointers.
--
dib
Jul 23 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
didier Belot wrote:
Hi!

If the subject isn't clear:

Modern browsers provide an optional way of remembering user input in
textbox: user begin to type, and a list drop down just under the
textbox showing matching strings already typed.

I just want to provide my own droplist.
Then instead of a text input, use a select element.
Is there an already existing component/script somewhere, and if not,
See above.
is there a way of either:
- place some div that cover that builtin list
No.
- feed the builtins list with my own values


No.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq
Jul 23 '05 #2

P: n/a
Randy Webb wrote:
didier Belot wrote:
Hi!

If the subject isn't clear:

Modern browsers provide an optional way of remembering user input in
textbox: user begin to type, and a list drop down just under the
textbox showing matching strings already typed.

I just want to provide my own droplist.

Then instead of a text input, use a select element.


Yes. There is a good example, the nearest of what I want, at evolt.com:
http://evolt.org/article/Dynamically...ript/17/55035/

The problem with only a select is: the list can't be populated before
the user type in some chars; it's about the classical "suggest as you
type" ported to the web, with a distant MySQL server : we don't want to
load a select with 10000+ records, but as soon as we have 3/4 letters,
we can load a smaller list (using either xmlrpc or the iframe technique)
and begin offering suggestions to user...

(...)
is there a way of either:
- place some div that cover that builtin list


No.
- feed the builtins list with my own values


No.


last attempt ;-) : disable that builtin list ?
(I guess the answer is... no)

Anyway, thanks for yous answer.
--
dib
Jul 23 '05 #3

P: n/a
You could get rid of the built-in list by randomly generating the field
name...

"didier Belot" <di*@electrolinux.com> wrote in message
news:cg**********@aphrodite.grec.isp.9tel.net...
Hi!

If the subject isn't clear:

Modern browsers provide an optional way of remembering user input in
textbox: user begin to type, and a list drop down just under the
textbox showing matching strings already typed.

I just want to provide my own droplist.

Is there an already existing component/script somewhere, and if not,
is there a way of either:
- place some div that cover that builtin list
- feed the builtins list with my own values

Thanks for any help or pointers.
--
dib

Jul 23 '05 #4

P: n/a
SomeGei wrote:
You could get rid of the built-in list by randomly generating the field
name...


And in the process, make it 100 times harder (if not more) to retrieve
the form fields when the form is submitted. Thats a bit like shooting
your foot off to get a splinter out of your toe :)

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq
Jul 23 '05 #5

P: n/a
didier Belot wrote:
Randy Webb wrote:
didier Belot wrote:
Hi!

If the subject isn't clear:

Modern browsers provide an optional way of remembering user input in
textbox: user begin to type, and a list drop down just under the
textbox showing matching strings already typed.
I just want to provide my own droplist.


Then instead of a text input, use a select element.

Yes. There is a good example, the nearest of what I want, at evolt.com:
http://evolt.org/article/Dynamically...ript/17/55035/
The problem with only a select is: the list can't be populated before
the user type in some chars; it's about the classical "suggest as you
type" ported to the web, with a distant MySQL server : we don't want to
load a select with 10000+ records, but as soon as we have 3/4 letters,
we can load a smaller list (using either xmlrpc or the iframe technique)
and begin offering suggestions to user...


If the list is that extensive, then you may want to look into breaking
it down into categories then. Maybe even a dependent select element
situation where the 4th (or so) depends on the 3rd depends on the 2nd
depends on the 1st. And yes, with some solid planning, it could be
implemented without a JS dependency.
(...)
is there a way of either:
- place some div that cover that builtin list

No.
- feed the builtins list with my own values

No.

last attempt ;-) : disable that builtin list ?
(I guess the answer is... no)


You guessed right :) Its a user preference and js can't override user
preferences (thankfully).

Other than what was suggested in another reply, of giving that text
field a random name. Use the onchange event handler to populate the
actual field before submission. Then you have introduced a needless
dependency on JS and annoyed your users that have the prefs set to show
that list :)
Anyway, thanks for yous answer.


Welcome.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq
Jul 23 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.