1 2 3 4 5 6
$(document).ready(function() { current_url = window.location.href if (current_url.match("&closewin=true")) { window.close(); } });