Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi all,

I am using "window.showModalDialog" to launch the child page from parent page in my app.I just invoke that child page on client click event of button control on parent page.But the focus on button control on parent page goes of when i come back to parent page from child page.Can some body help me on that. I need to set the focus on the button control as soon as I come back to parent page from child page. How can I do that ??

I used
<base target="_self" />

which reload my parent page. and focus goes off.


Thanks in advance

Yogesh
Posted
Comments
Debabrata_Das 1-Jul-14 12:00pm    
Hi Yogesh, Can you please share your aspx changes? Have you used <asp:Button> or HTML button control?

1 solution

When you close the modal popup, set the focus to the button.
JavaScript
$("#buttonId").focus();
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900