- Readme First! - Read and follow the rules, otherwise your posts will be closed
There are currently, 65 guest(s) and 0 member(s) that are online. You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - Status Bar - Where To Add Javascript [ ]
Author
Message
Fatal1ty
Private
Joined: Dec 15, 2004
Posts: 47
Location: The Netherlands
Posted:
Mon Jan 09, 2006 10:27 am
Hi
I have this code for my status bar in the browser window:
Code:
function _start() {clearInterval(.sttm);_init();if (arguments.length>0) _init2(arguments[0]);.sttm=setInterval ("doEffect('')",10);}function _stop() {clearInterval(.sttm);window.status="";}_init();function _init() {={stel:0,stft:"",stec:1,stcel:1,stce:-1,stcl:-1,stls:-1,stcs:0,sttg:0,stea:["||||+*^-={Welcome To The Official /#IGA./ Website}=-^*+ /#/Enjoy Your Stay\#\||||",0,10,10]};}function _init2 (en) {.stea=[.stea[(en-1)*4],.stea[(en-1)*4+1],.stea[(en-1)*4+2],.stea[(en-1)*4+3]];.stec=1;.stel=0;}function doEffect(es) {var s=eval(es);if (s.stce==s.stec) {if (s.stcel==s.stel) {clearInterval(s.sttm);window.status=s.stft;return;} else {if (s.stel>0) s.stcel++;s.stce=-1;s.stcl=s.stls;}}if (s.stcl==s.stls) {s.stce++;s.sttx=s.stea[s.stce*4];s.sttp=s.stea[s.stce*4+1];s.stsd=s.stea[s.stce*4+2];s.stls=s.stea[s.stce*4+3];s.stcl=0;s.stsp=1;s.sttg=0;}if (21-s.stsd-s.sttg==0) {var stres=eval("stEffect"+s.sttp+"(s.sttx,s.stsp++,es);");s.sttg=0;if (stres!="") window.status=stres;else {s.stcl++;s.stsp=1;}}s.sttg++;}function stEffect0(text,step){if (step>text.length) return "";else return text.substring(0,step);}_start();
How can i add it and to which file?
Thanks
(edit)
It is Javascript
_________________ 'Imagination Is More Important Then Knowledge' Albert Einstein
Visit http://www.iga-hq.co.nr ... Check It!
Evaders99
Site Admin
Joined: Aug 17, 2003
Posts: 12397
Posted:
Mon Jan 09, 2006 12:49 pm
Fatal1ty
Private
Joined: Dec 15, 2004
Posts: 47
Location: The Netherlands
Posted:
Mon Jan 09, 2006 1:01 pm
Thankyou
I tried include("1.js"); and a few other things.
but it just shows the code at the top of the screen, how do i insert it? or an error
Thanks
_________________ 'Imagination Is More Important Then Knowledge' Albert Einstein
Visit http://www.iga-hq.co.nr ... Check It!
Prophet
Captain
Joined: Mar 14, 2004
Posts: 422
Location: Florida, USA, Earth, Space
Posted:
Mon Jan 09, 2006 1:29 pm
Code:
echo "[script type='text/javascript' src='1.js'][/script]";
Replace [] with <>
_________________ - Prophet
Get the Last Visit module (and others modules I designed) from my website! FREE! http://jasonlau.biz
http://DotCom.Name
Fatal1ty
Private
Joined: Dec 15, 2004
Posts: 47
Location: The Netherlands
Posted:
Mon Jan 09, 2006 1:52 pm
I'm not following you..
_________________ 'Imagination Is More Important Then Knowledge' Albert Einstein
Visit http://www.iga-hq.co.nr ... Check It!
Prophet
Captain
Joined: Mar 14, 2004
Posts: 422
Location: Florida, USA, Earth, Space
Posted:
Mon Jan 09, 2006 6:32 pm
I assumed that you have saved your javascript code as a file (1.js).
If so, add the code from my last post to the bottom of includes/javascript.php. Add it before the closing ?> php tag.
_________________ - Prophet
Get the Last Visit module (and others modules I designed) from my website! FREE! http://jasonlau.biz
http://DotCom.Name
Fatal1ty
Private
Joined: Dec 15, 2004
Posts: 47
Location: The Netherlands
Posted:
Tue Jan 10, 2006 7:07 am
All i see is
Code:
[script type='text/javascript' src='1.js'][/script]
at the top of the page.
-Edit-
I added the < & > In place of [ & ]
It isn't displaying the message at the top of the page however the status bar also isn't showing anything.
Thanks
_________________ 'Imagination Is More Important Then Knowledge' Albert Einstein
Visit http://www.iga-hq.co.nr ... Check It!
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum