Time Function --- Help.

  • Thread starter Thread starter le9569
  • Start date Start date
L

le9569

Hello all,

I have a dropdownlist with more than 40 items inside. I am trying to write a
function that if the user change more than 20 items in the dropdownlist
within 4 seconds then I redirect to another page.

This action will be using in the SelectedIndexChanged.

The problem is how do I start timing?

Your help or direction to any article are big help for me.

Thank you.

Below is my SelectedIndexChanged:



Private Sub Student_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
StudentList.SelectedIndexChanged

'Start timing????

End Sub 'StudentList_SelectedIndexChanged

(e-mail address removed)
 
Timing cannot be accomplished on the server side for a client action (For
this case at least). In other words, you SelectIndex change event will only
work when the index is changed and has nothing to do with timing.

You will have to time this using a JavaScript. Look for something there:

http://www.javascriptkit.com/script/cutindex1.shtml

Patrick
 
Back
Top