Quote:
Originally Posted by Zaja
- Create scripts directory under skin directory.
- Call the external java script like this:
Code:
<script type="text/javascript" language="JavaScript 1.2" src="{$SkinDir}/scripts/newscript.js"></script>
- Example of newscript.js:
Code:
<!--
{literal}
function printpage() {
window.print();
}
{/literal}
// -->
|
Sorry for the long delay in giving you my personal thanks for your suggestions. I tried them but still cannot get it to work.
I followed your instructions above or at least I think, unless I missed something?
created folder "skin1/scripts"
then added this code to my home.tpl
<script type="text/javascript" language="JavaScript 1.2" src="{$SkinDir}/scripts/scroll.js"></script>
Then created "scroll.js" and placed in the skin1/scripts folder, here my code below:
{literal} <script language="JavaScript" type="text/JavaScript">
<!-- Begin
var Message="scrollMessagetoappear";
var place=1;
function scrollIn() {
window.status=Message.substring(0, place);
if (place >= Message.length) {
place=1;
window.setTimeout("scrollOut()",100);
} else {
place++;
window.setTimeout("scrollIn()",120);
}
}
function scrollOut() {
window.status=Message.substring(place, Message.length);
if (place >= Message.length) {
place=1;
window.setTimeout("scrollIn()", 100);
} else {
place++;
window.setTimeout("scrollOut()", 100);
}
}
scrollIn()
// End -->
</script>{/literal}
But I still cannot get this too work, could you please assist me?
thanks in advance and sorry if I am missing something here.
