The circle of life – ** .Net – Training – MOSS **

  • Past Post

  • Vistor Locations

  • Advertisements

Modal dialogs and browser caching

Posted by Clayton James on September 11, 2007

There seems to be quite a number of behavioural differences between window.open and window.showModalDialog.

 I was having an issue when opening a showModalDialog the page didn’t seem to be raising the page load event, but the window.open was working perfectly.

IE apparently caches modal forms so I needed to remove this default behaviour. I entered the following two lines in the page load event and all seems to be fine:

Response.Expires = 0;

 I also always forget to place the following element in the <head> element to stop the .showModalDialog creating a new window instance.
<base target=”_self”>


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: