a17000 Posted July 26, 2017 Share Posted July 26, 2017 Hi all, I use the prestashop's backoffice via my CRM (Sugarcrm), I have made a module vhose show the prestashop backoffice in a iframe. <iframe id="frameprestashopacacia" width="100%" height="650"></iframe> <script type="text/javascript"> var iframe = document.getElementById('frameprestashopacacia'); iframe.src = "http://192.168.1.12/prestashop/admin070lursxx"; var une_fois = true; iframe.onload = function() { if (une_fois){ une_fois = false; //iframe.getElementById('email').value= "[email protected]"; iframe.contentWindow.document.getElementById('email').value= "myemaillogin"; iframe.contentWindow.document.getElementById('passwd').value= "mypassword"; iframe.contentWindow.document.getElementById('login_form').submit(); } } </script> But when 'getElementById('login_form').submit();' is fired the page reload, why?And How to login to this page without click manually all the time? Thanks, Link to comment Share on other sites More sharing options...
Scully Posted July 26, 2017 Share Posted July 26, 2017 Joking or not? Never code user names or passwords into a file - even if the file seems not to be public. The cause of the reload is the embedded frame. The frame has a fixed source. It's not updated after you log on. Link to comment Share on other sites More sharing options...
a17000 Posted January 31, 2018 Author Share Posted January 31, 2018 I am find another solution with override class AdminLoginController Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now