Sometimes we executes some server-side code first and then executes javascripts from the server-side code in button click event of the modal window (or new window) . If we execute javascript using
Response.write(“javascript code here”);
.
.
Response.write(“javascript code here”);
inside our server-side code, then the parent page will get flashing.
To control this, we can put a Literal control on the [...]
Archive for the ‘javascript’ Category
Control page flash when executes server-side code first and then executes javascript from the server-side code
Posted in javascript on October 14, 2006 | Leave a Comment »
Close modal dialog from server side code
Posted in javascript on October 14, 2006 | Leave a Comment »
Add <BASE target=”_self”> inside the <head> tag of your aspx page ( modal dialog page).
I’ll update the sample code for this post.
Forcing parent page refresh through javascript
Posted in javascript on October 14, 2006 | 1 Comment »
There are many ways to refresh the parent page from the sub-window(modal window) through javascript. Some of them are:
window.opener.document.location.href=window.opener.document.location.href;
(or)
window.parent.document.location.reload();
(or)
window.parent.document.location.href=”ParentPage.aspx” mce_href=”ParentPage.aspx”;