domorodecmezilidmi Posted October 31, 2014 Share Posted October 31, 2014 (edited) Hi guys, I would like to ask you if anyone from you has ever added some external JavaScript code to some file of PS? I am trying to put this to file order-opc-new-account.tpl but no any change is seems to be... I probably need to put it to some other file. I have also tried file order-opc.tpl but the same - no change. This could help me really much. What am I doing wrong? <script type="text/javascript"><!--function AutoScrollOnload() {// Specify how many pixels from the left// and how many down from the top to// automatically scroll the page.var InFromLeft = 172;var DownFromTop = 364;// No other customization required.window.scrollTo(InFromLeft,DownFromTop);}function AddOnloadEvent(f) {if(typeof window.onload != 'function') { window.onload = f; }else {var cache = window.onload;window.onload = function() {if(cache) { cache(); }f();};}}AddOnloadEvent(AutoScrollOnload);//--></script> Or is it necessary to put this javascript inside the {literal}{/literal} tags ?? Edited November 3, 2014 by domorodecmezilidmi (see edit history) Link to comment Share on other sites More sharing options...
domorodecmezilidmi Posted October 31, 2014 Author Share Posted October 31, 2014 I know where is mistake, I have probably change value of var InFromLeft instead of var DownFromTop that needs to be set up to really high number. I have no chance to test it now so I will check later at home. Link to comment Share on other sites More sharing options...
domorodecmezilidmi Posted October 31, 2014 Author Share Posted October 31, 2014 Deal is done. It works. Good job 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