.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> JavaScript/VBScript >> Post New QuestionBookmark and Share Subscribe to Forum

Javascript: Closing a browser without warning

Posted By: Dilip     Posted Date: April 03, 2010    Points:2   Category :JavaScript/VBScript
How to close a IE browser without giving a warning message?

Responses
Author: Amit Mehra             
Posted Date: April 03, 2010     Points: 5   

Hi dilip,

To close browser without warning message try this code

function closeWithoutWarning() 
{
window.opener = self;
window.close();
}


Thanks,
Amit
Please "Mark As Answer " if this post help you.
Author: Dilip             
Posted Date: April 03, 2010     Points: 5   

Sorry this is not working!

Regards
Dilip
Author: Amit Mehra             
Posted Date: April 03, 2010     Points: 5   

Hi Dilip,

You might be using IE 7+ version. Check this code it working in IE8

 function closeWithoutWarning()
{
window.opener='X';
window.open('','_parent','');
window.close();
}


Thanks,
Amit
Please "Mark As Answer " if this post help you.
Author: Dilip             
Posted Date: April 03, 2010     Points: 5   

Cool Thanks its working.!!!!!

Regards
Dilip


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend