downCookie.aspx 686 B

123456789101112131415161718
  1. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="downCookie.aspx.cs" Inherits="downCookie" %>
  2. <script type="text/javascript">
  3. window.onload = function () {
  4. // create listener
  5. function receiveMessage(e) {
  6. if (e.data == "cookie") {
  7. parent.postMessage(document.cookie, "*");
  8. } else if (e.data.indexOf("clear")!=-1) {
  9. document.cookie = "fileDownload=; expires=" + new Date(1000).toUTCString() + "; path=" + settings.cookiePath;
  10. }
  11. }
  12. window.addEventListener('message', receiveMessage);
  13. // call parent
  14. //parent.postMessage("GetWhiteLabel", "*");
  15. }
  16. </script>