|
-
Nov 16th, 2000, 11:25 AM
#1
Thread Starter
Addicted Member
Hi,
can anyone tell me if there is an event fired when the contents of a list box change. I don't think onchange is the required event: MS says:
This event is fired when the contents are committed and not while the value is changing. For example, on a text box, this event is not fired while the user is typing, but rather when the user commits the change by leaving the text box that has focus.
I have a list box which automatically matches a partial string as it is typed in a text box with its nearest full string in the list box. So as someone is typing the selected item in the text box changes. I need the method ( if one exists ) which is when when the contents change AND gfocus is not lost.
Any help greatly appreciated.
Lenin.
-
Nov 17th, 2000, 10:02 AM
#2
Frenzied Member
That is true enough for a text box but onchange works as expected for a SELECT tag/list box.
oOOo--oOOo
__ /\/\onte96
oOOo--oOOo
Senior Programmer/Analyst
MCP
[email protected]
[email protected]
Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..
-
Nov 17th, 2000, 11:26 AM
#3
Thread Starter
Addicted Member
Monte, I tried the following:
<SELECT NAME="TownCombo" width=5 size="1" onChange="BuildList(this);">
<SCRIPT Language="JavaScript">
// Dynamic Town List
function BuildList(num)
{
alert("OH");
}
</Script>
The listbox does not have focus, but the contents continually changed based on my input to a textbox doing the match.
Let me know your thoughts.
Lenin.
-
Nov 17th, 2000, 02:30 PM
#4
Frenzied Member
Wait. I just re-read your question.
If you mean when you add or remove option elements from the select element, then no there is no event for that. There is no event for that.
If you mean when the selected item changes, then onchange works.
oOOo--oOOo
__ /\/\onte96
oOOo--oOOo
Senior Programmer/Analyst
MCP
[email protected]
[email protected]
Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|