C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Tips » Web Development »

Close Browser using Javascript


Posted Date: 12 Aug 2009    Resource Type: Tips    Category: Web Development
Author: SagarMember Level: Gold    
Rating: 1 out of 5Points: 3



you can write window.close(); in JavaScript to close the current browser, however you will receive a pop-up.
If you want to avoid that pop-up you can write following lines of code.


window.opener='x';
window.close();


'X' takes an reference to the window which opens a pop-up and closes it immediately as soon as it gets Close function.

Try. It works.





Responses

Author: Sagar    13 Aug 2009Member Level: Gold   Points : 1
For IE7

function CloseWindow()
{
window.open('','_self','');
window.close();
}






Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sign In to add tags.
Window  .  Opener  .  JavaScript  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: How to insert local report with report wizard?
Previous Resource: Set page break as you like with Java web reporting tool
Return to Discussion Resource Index
Post New Resource
Category: Web Development


Post resources and earn money!
 
More Resources



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use