Self.close not working in WindowsXP and Vista versions

Hi All,

The following code is not working as expected in Windows XP and Vista versions. It is working excellently in Windows 2000.

Code Begin:----------------------------

function closeWin()

{

alert(“Window will be closed.”);

self.opener = this;

self.close();

}

Code End:-------------------------------

The above code should display alert msg and when clicked on button, the current IE window must close without another (or default Microsoft message) confirmation messagebox.

So, this logic is working without any problem in Windows 2000. However, it is showing the Microsoft’s default confirmation message with / btns, after my alert messagebox when tried in WindowsXP and Vista versions.

If anyone know how to avoid the MS default confirmation msg in XP and Vista versions, kindly advise.

(or)

Kindly advise if any alternative code that works in all windows versions, to close current window without another popup msg.

Regards,

Kumar.

Subject: RE: self.close not working in WindowsXP and Vista versions

In what sense is this a question about Lotus Notes? Just wondering.

Subject: RE: self.close not working in WindowsXP and Vista versions

Hi Andre Guirard,

This is very much related to Lotus Notes because I am using this javascript function in JSHeader, in one of the form.

I have “Logout” link on the form and upon clicking the link, I call this function.

Now, since some of our users are using Windows2000… some are using windowsXP and some other are using Vista…, this javascript function is working differently in each version except windows2000.

So, just curious if somebody in this forum got any suggestion/solution for this type of issue.

Thanks,

Kumar.

Subject: RE: self.close not working in WindowsXP and Vista versions

The point is, it doesn’t matter where you are typing the JavaScript code. It’s being executed by all-Microsoft products. Someone here might be able to answer you, but surely you’ll find a larger pool of people who know this stuff on a Microsoft forum.

Did you try this?

Subject: RE: self.close not working in WindowsXP and Vista versions

Hi Andre Guirard,

Thank you for your valuable advise and the link.

However, I am searching “whole” web simulteneously to find solution for my issue.

I will post again here once I fix it.

Thanks, Kumar.

Subject: Which versions of internet explorer have you tried this in?

In Internet Explorer 7.0 a ‘security feature’ has been introduced that pops up this message unless the browser window was opened through script.

I’ve run into the same at a customer with DWA 7.0.x set as default mail client within their Citrix environment.

In that case when you choose to send a document from within Microsoft Office, it will open up a DWA new message browser window with the document as an attachment, but once you send it it will pop up this prompt.

http://www.developersdex.com/asp/message.asp?p=1824&r=5144813

Good luck.