Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #7592
| From | Antony Scriven <adscriven@gmail.com> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: onKeyUp when selecting from autocomplete |
| Date | 2011-10-20 16:13 -0700 |
| Organization | http://groups.google.com |
| Message-ID | <70f0467f-33d2-43dd-bf40-ed45cf2d8bbe@gk10g2000vbb.googlegroups.com> (permalink) |
| References | <21118012.96.1319074503372.JavaMail.geo-discussion-forums@yqp37> |
On Oct 20, 2:35 am, Jason C wrote:
> I'm changing a DIV area as the site visitor types into an
> input field, like this:
>
> <input type="text" name="title" size="20"
> onKeyUp="
> document.getElementById('title').innerHTML =
> document.admanager.title.value
> ">
>
> This works fine if they are actually typing, but the
> problem I'm having is if they're typing and select
> something from their browser's autocomplete. If they
> select it using an arrow and carriage return, then it
> still works, but if they select with their mouse then it
> doesn't.
>
> Is there an event that runs on key press OR mouse
> selection, or am I going to have to duplicate it like
> this? (untested):
>
> <input type="text" name="title" size="20"
> onKeyUp="
> document.getElementById('title').innerHTML =
> document.admanager.title.value
> "
>
> onChange="
> document.getElementById('title').innerHTML =
> document.admanager.title.value
> "
'(untested)' Why? --Antony
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar
onKeyUp when selecting from autocomplete Jason C <jwcarlton@gmail.com> - 2011-10-19 18:35 -0700 Re: onKeyUp when selecting from autocomplete Antony Scriven <adscriven@gmail.com> - 2011-10-20 16:13 -0700 Re: onKeyUp when selecting from autocomplete dhtml <dhtmlkitchen@gmail.com> - 2011-10-20 21:23 -0700
csiph-web