Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #7580
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.lightlink.com!news.iecc.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail |
|---|---|
| From | Jason C <jwcarlton@gmail.com> |
| Newsgroups | comp.lang.javascript |
| Subject | onKeyUp when selecting from autocomplete |
| Date | Wed, 19 Oct 2011 18:35:03 -0700 (PDT) |
| Organization | http://groups.google.com |
| Lines | 28 |
| Message-ID | <21118012.96.1319074503372.JavaMail.geo-discussion-forums@yqp37> (permalink) |
| Reply-To | comp.lang.javascript@googlegroups.com |
| NNTP-Posting-Host | 67.237.93.23 |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding | quoted-printable |
| X-Trace | posting.google.com 1319074503 1286 127.0.0.1 (20 Oct 2011 01:35:03 GMT) |
| X-Complaints-To | groups-abuse@google.com |
| NNTP-Posting-Date | Thu, 20 Oct 2011 01:35:03 +0000 (UTC) |
| Complaints-To | groups-abuse@google.com |
| Injection-Info | glegroupsg2000goo.googlegroups.com; posting-host=67.237.93.23; posting-account=494U9QkAAACJUH6jIcyb5E30maZZLsu7 |
| User-Agent | G2/1.0 |
| X-Google-Web-Client | true |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.javascript:7580 |
Show key headers only | View raw
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
"
>
Back to comp.lang.javascript | Previous | Next — 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