0 Replies Latest reply on Aug 22, 2015 5:07 AM by Keenyo

    Can't read cookie

    Keenyo

      Hey guys,

      Sorry about my english


      I can't read a cookie in Edge Animate, how can I do it ?

       

      I'm already saw the others topics about it (i think hehe). I tried to add a .js file clicking in "+" on library or just put on "compositeready" but don't work

       

      the code is

       

      if (document.cookie.indexOf("url") >= 0) {

      // create usable cookies array

      var pairs = document.cookie.split(";");

      var cookies = [];

      for( var c = 0; c < pairs.length; ++c)

      {

          var pair = pairs[c].replace(/\s/g,"").split("=");

          cookies[ pair[0] ] = pair[1];

      }

       

       

      // create the iframe

      document.getElementById("principal").src = cookies["url"];

      // assign it the remembered url

       

       

      // delete the cookie

      document.cookie = "url=; expires=Thu, 02 Jan 1970 00:00:00 UTC";

      }

       

      help me ?