views:

31

answers:

0

I've built an ASP User Control that implements the AJAX Control Toolkit PopupControlExtender.

It pops up a div containing a text box, and an OK/Cancel button. The idea is that the user can click a "rename" icon, which displays the popup with a message saying "Please enter the new name" and a text box with the old name already populated and highlighted, so that when the user starts to type, it immediately overwrites the old name, or the user can simply edit the existing name.

I can work out some simple Javascript to set the focus and select the text, but how do I get it to execute just as the popup is displayed? The text box is populated during an AJAX call back.

The code for my user control is quite large because it's doing a lot of stuff, so I won't post it unless anyone requests it.

Thanks, Ben