Click here to Skip to main content
15,889,909 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
C#
function closeMe()
            {

                window.open('','_parent','');
                window.close();

         }

i have above js function for close window but it will not work in fire fox but after use of following

about:config address bar of fire fox and set
dom.allow_scripts_to_close_windows to true
using this windows is close but any one suggest me how to use this settings in my asp.net js function or asp.net code
Posted
Comments
Sunasara Imdadhusen 28-Sep-11 9:35am    
you need to call javascript from server side?

1 solution

If you want to call from asp.net code behind then You can register client script as below:

JavaScript
Page.ClientScript.RegisterClientScriptBlock(this,"key","closeMe();");
 
Share this answer
 
Comments
JQuery Geeks 24-Oct-11 1:34am    
good

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900