0 Replies Latest reply on Aug 17, 2015 10:12 PM by Keenyo

    Redirect a page direct to inside an iframe with cookie

    Keenyo

      Guys ! please help !

      first. sorry about my english

       

      I'm a little noob in edge animate and need help to do a code who can...

      1 - detect if is the page is on iframe and if NOT, redirect to a page with edge animate direct to INSIDE an iframe

       

      I have a project to do a "entire" site with edge animate but to do that I need iframes and i think in that system to do what I want

       

      I think that's possible with cookies, I tried that but don't work ... help me

       

       

      in my page who I want transfer and redirect to my edge animate inside an Iframe I'm using this code

       

      <script>

      if(self.location==top.location) {

          document.cookie = "iframe=" + self.location;

       

       

           top.location.replace('mysitewithedge.html' );

      }

      </script>

       

      in edge animate i'm using this code to read the cookies and push the page inside my iframe

       

      sym.$("iframe").append('<iframe name="frame" id="frame" height="100%" width="1261px" frameborder="0" scrolling="yes"></iframe>');

       

       

      document.getElementById("frame").src = readCookie("iframe");

      // delete cookie after use

      document.cookie = "iframe=; expires=Thu, 01 Jan 1970 00:00:00 UTC";

       

       

       

       

       

      than I add the jquery.cookie.js on my project ... but it don't work

      what am I doing wrong here ? =(