[WebGrid] New window pop-up appear behind the current page.

This issue occurred only in IE7.

When “window.open” is called on client side in order to open new window, this pop-up window will not be focused (appeared behind the current page). 

The default behavior is this pop-up will be focused (appear in front of the current page).

The workaround for this issue is developer need to set timeout before called window.open function.

example :

   function DoCellClick() {
    window.setTimeout(testWindowOpen, 100);
   }
  
   function testWindowOpen() {
    window.open(“http://www.intersoftpt.com“);
   }

Hopefully, this little tips will give benefit for all of you.

Advertisements

2 thoughts on “[WebGrid] New window pop-up appear behind the current page.

  1. Dicky

    I have tested the tips. and I think it works fine. Before I use setTimeout() the window pop-up shown in behind the current page. Right after use setTimeout() the window pop-up show in front of the current page.
    Try to give higher value on SetTimeout(), maybe you can set it into 200.
    And just to remind this issue occurs when you open page that contains WebGrid. setTimeout() will give several time to allow browser to load WebGrid’s scripts.
    Hope this helps.

    Cheers..

    Reply

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s