Thursday, August 11, 2011

Frequent question on parent and child page refresh, reload, function call in asp-net using javascript

There are ways to call client functions in a parent web page from the child window. This is very helpful in many ways:
1. You can refresh parent page after some updates from child pager
2. You can partially change parts of the parent page
3. You can control the behaviour of parent page from its child (even from iframe child page)

Example? See the way you edit a section in your blogger blog site. When you are logged in and browsing your blog, blogger lets you edit sections of your blog page directly from the public page of your blog. When you click the edit icon, a window will pop up and load with the setting of the editable section. Now when you save your changes the pop up window will close itself and the parent page (your public page) will be refreshed. Want to implement the same?

You can follow these steps:
1. Program your parent page to open new window : You can place a hyperlink in your parent page. There are other several ways to open new window in web page.
2. Call client function in parent page : Now you can call client function in parent page from the child page. I have already posted how to call javascript function in parent web page from child page.
3. Sometimes your child page is a page loaded in iframe from your parent page. In that case it will be a bit different than what I have mentioned in (2). Learn how to refresh parent parent from iframe child page.

I hope this will help tackle the mostly asked questions on parent and child page programming in using javascript.

Happy programming!
kick it on


Post a Comment

Hope you liked this post. You can leave your message or you can put your valuable suggestions on this post here. Thanks for the sharing and cooperation!

Popular Posts

Recent Articles