Jump to content

[Solved]Does Presta support JavaScript code?


Recommended Posts

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... :huh: 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 by domorodecmezilidmi (see edit history)
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...