DropDownList

Joined
Oct 9, 2006
Messages
1
Reaction score
0
Hi all,

I got this ddl that when onchange will call this javascript. This javascript handle the dopostback on when to call it if condition are met.

My problem now is how to get the previous selected item/index via javascript?

For example, i got 1 2 3. 1 is selected on page load by default, when select 3, the previous selected will be 1.

How do I get the previous selected item via javascript?
 
Joined
Sep 5, 2006
Messages
11
Reaction score
0
Well, EasyListBox stores the previous selection, but I'm not sure you can retrieve it from the native ASP.NET dropdownlist unless you store it somewhere first (perhaps in a Javascript variable when the page loads).

What are you trying to do here? If you just want to reset the form to its original values, then form.reset() may be your solution.

Cheers,
 
Last edited:

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
474,262
Messages
2,571,049
Members
48,769
Latest member
Clifft

Latest Threads

Top