0

I have a State DDL and a Country DDL. I have CascadingDropdown controls for each of those DDLs.

When the user selects an entry from the Country DDL, the State dropdown gets populated with the results of a service method call.

I want to disable a submit button while the State dropdown is populating. Is there a way to capture when the State DDL finishes populating so that I can do this in JavaScript?

Tedderz
  • 587
  • 5
  • 16

2 Answers2

0

How are you calling your service method? Both the Microsoft AJAX library and jQuery offer a callback method when you execute an AJAX call. In your javascript function that calls the service, disable the button. Provide a callback to the AJAX call's 'onSuccess' (or whatever it is called) that turns it back on.

Quick article on Microsoft AJAX PageMethods javascript class.

jQuery ajax() method.

GunnerL3510
  • 715
  • 3
  • 15
  • The CascadingDropdown calls the service method. My code doesn't directly call the service method. My question was essentially whether the CascadingDropdown fires an event that I can use to handle when the CascadingDropdown has finished populating a child menu. Though I'm able to specify a service method on the CascadingDropdown for it to call, I've not seen a way to specify a callback. – Tedderz Oct 10 '11 at 18:34
0

CascadingDropdown provides no such JavaScript event as far as I have seen.

Tedderz
  • 587
  • 5
  • 16