J
Jason C
I'm changing a DIV area as the site visitor types into an input field, likethis:
<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
"
<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
"