CodeAs follows:
< Html >
< Head >
< Title > Test </ Title >
< Script Type = "Text/JavaScript" >
Function Onddlselecting (DDL ){
If ( ! DDL. Bypass ){
DDL. Bypass = True ;
Document. getelementbyid ( " Label " ). Innertext = DDL. ID + " Is selecting " ;
} Else {
DDL. Bypass = False ;
}
}
Function Onddlidle (){
If (Event. propertyname = ' Value ' ){
Document. getelementbyid ( " Label " ). Innertext = " Idle " ;
}
}
</ Script >
</ Head >
< Body >
< Div >
< Span > Ddl1 </ Span >
< Select ID = "Ddl1" Onclick = "Onddlselecting (this );" Onpropertychange = "Onddlidle ();" >
< Option Value = "1" > One </ Option >
< Option Value = "2" > Two </ Option >
< Option Value = "3" > Three </ Option >
</ Select >
< Span > Ddl2 </ Span >
< Select ID = "Ddl2" Onclick = "Onddlselecting (this );" Onpropertychange = "Onddlidle ();" >
< Option Value = "1" > One </ Option >
< Option Value = "2" > Two </ Option >
< Option Value = "3" > Three </ Option >
</ Select >
< BR />
< BR />
< BR />
< BR />
< BR />
< Div Style = "Border: solid 1px black; Background-color: Silver; padding: 5px 5px 5px 5px ;" >
< Span > Status: </ Span > < Span ID = "Label" > Idle </ Span > </ Div >
</ Div >
</ Body >
</ Html >