Feeds:
Posts
Comments

Archive for the ‘javascript’ Category

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 form of the modal dialog page and then put your javascript code in that literal and call Response.Write(Literal1.Text) .

Literal1.Text=”java script here”;

Response.Write(Literal1.Text) ;

Read Full Post »

Add <BASE target=”_self”> inside the <head> tag of your aspx page ( modal dialog page).

I’ll update the sample code for this post.

Read Full Post »

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”;

Read Full Post »