avoid click OK button twice to close a dialog

D

Danny Wang

HI,
I have a dialog (window) with a drop-down list and an OK button. When
user clicks the drop-down list, the app need to do some calculation and
validation, so I put an Text_on_change event on the drop-down. When
click OK the dialog should be closed; however, if the user already
clicked the drop-down, he needs to click OK button twice to close the
window. After a little research I found out the once the focus is moved
out the drop-down list control, the Text_on_change event is triggered,
and this event has higher priority than 'OK button clicked' event. So
the first click the server will not see the 'OK button clicked' event.
I found a solution to move all calcuation and validation to client side
and rewrite them in javascript. Although is can work, it is extremly
annoying to mix the logic with client side java script.
I wonder if anybody have a better solution to this porblem?
Thanks
Danny
 
C

Chandra Sekhar

The focus change shouldnt trigger a SelectedIndexChange event. There must be
something else going on.

According to me, there is nothing wrong in having client side and as well
serverside code.

Sekhar.
 
D

Danny Wang

There might be a mistake in my description:
THe drop-down should be a text input bar.
When user leave the text bar, the Text_on_Change associate with it is
trigger.

Danny
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top