asp.net mvc - Automatically close window after some time using JQuery -



asp.net mvc - Automatically close window after some time using JQuery -

i want close window automatically after 5 seconds using jquery. tried not working.

function submitdesignrequestform() { var frm = $("#frmdesignrequestform").serialize(); $.post("/admin/savedesignrequestform", frm, function(data) { notify("success", "saved successfully"); settimeout(function() { window.close(); }, 500); }); }); }

but above function show message not close windows.

settimeout(function() { notify("success", "saved successfully"); window.close(); }, 5000);

from above function "saved successfully" pops window not close.

please guide!

the problem not in code, tried identical one: info empty string otherwise same.

and worked perfectly, in google chrome, see these links problem can firefox , ie:

firefox: window.close() doesn't work on firefox, work around?

ie: how can close browser window without receiving "do want close window" prompt?

i hope helps!

jquery asp.net-mvc

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -