IE7 on windows vista leaves a blank window open, while opening a likn to document.

Posted on 2008-11-18
Medium Priority
Last Modified: 2013-12-08
We are planning for enterprise wide migration from WinXP with IE6 to Win Vista with IE7 (7.0.6001.18000) and facing problems while opening a document link (MS Office Documents) from our intranet application. Once the link is clicked, it opens a new page with a dialog box with options Open, Save and cancel. And if I click Open, it opens the word/ excel document in a seprate window and leaves a blank window open.
I know, there is already a post with same issue on EE forum but I have tried the solutions (tweaking the folder options and checking the target "_blank") mentioned in that but no luck.
Please help !
Vinit Tyagi
Question by:dearvinit
1 Comment

Accepted Solution

dearvinit earned 0 total points
ID: 23033288
I was using the following function to open the documents link.
function OpenDocument(durl)
window.open(durl, "_blank", "location=0,titlebar=0,menubar=1,resizable=1,left=5, top=5,width=" + (screen.availWidth-20) +",height=" + (screen.availHeight-100));
and I have replaced the target from _blank to _top for MS Office documents and its working (i.e opening the documents properly in new window, without leaving a blank page open). The resultant function is like ...

function OpenDocument(durl) {
      var ulen = durl.length;
      var extn = durl.substring(ulen-4, ulen); // extracting the extension
      extn = extn.toLowerCase();
      var word = new RegExp("do"); // for .doc, .dot, .docx, .dotx
      var xcel =  new RegExp("xl"); // for .xls, .xlsx, .xlt, .xltx
      var ppt =  new RegExp("ppt"); // for .ppt and .pptx
if (word.test(extn) || xcel.test(extn) || ppt.test(extn)) //if attachment is an MS office document.
window.open(durl, "_top", "location=0,titlebar=0,menubar=1,resizable=1,left=5, top=5,width=" + (screen.availWidth-20) +",height=" + (screen.availHeight-100));      
window.open(durl, "_blank", "location=0,titlebar=0,menubar=1,resizable=1,left=5, top=5,width=" + (screen.availWidth-20) +",height=" + (screen.availHeight-100));

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
Strategic internal linking is often considered an SEO power technique, especially for content marketing. Do you need to hire an SEO agency to optimize you internal linking? No, this article will help you understand the basics of internal linking and…
This Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses
Course of the Month15 days, 17 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question