How to close a window without prompt using java script?

How to close a window without prompt using java script?

For servlet:

out.println (“<script>”);
out.println (“window.opener = top;”);
out.println (“window.close()”);
out.println (“</script>”);

For html or jsp:

<script>
window.opener = top;
window.close();
</script>

Share

Related posts:

  1. How to call Jsp page from Javascript?
Tags: , ,
Technical, , Permalink

Leave a Reply

Your email address will not be published. Required fields are marked *

*


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>