SMF For Free Support Forum
Signup For Free Forum
October 15, 2008, 05:09:01 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome to SMF For Free. The best free SMF Host
 
   Home   Help Search Arcade Gallery Login Register  

Pages: [1]
  Print  
Author Topic: Javascript for Trailing Cursor  (Read 1248 times)
0 Members and 1 Guest are viewing this topic.
Melody670
SMF For Free Full Member
*
Offline Offline

Posts: 114


View Profile
« on: October 27, 2007, 09:44:02 pm »

Forum Url: http://http://soapsandmore..smfforfree.com
I found an awesome website called JSMade Easy.com!  It actually gives you the javascript to simply copy and paste!  Ok, so, I got rain on our board, but thought I would do something cute with a trailing cursor for Halloween.  I have the javascript code ....but don't know where to put it on our board!  I tried putting it in headers and footers and then went to the CSS code and put it in the text section, then put it at the bottom....nothin'.  I'm lost!  Can someone please tell me where to put the code so that our members can have a trailing cursor...or is this something we can't have on the board?  Oh, one more thing, I am trying to find the script for fog...would I put that in the headers/footers section?

Any help is greatly appreciated! Smiley
« Last Edit: October 28, 2007, 08:39:18 am by Melody670 » Logged
mr_css
SMF For Free Sr. Member
*
Offline Offline

Posts: 259



View Profile
« Reply #1 on: October 28, 2007, 08:19:23 am »

very nice i've been looking for something like this actually (believe it or not) It helps me think and learn about javascript.
Logged


            WOLFSCAPE FORUMS
Melody670
SMF For Free Full Member
*
Offline Offline

Posts: 114


View Profile
« Reply #2 on: October 28, 2007, 11:08:58 am »

Forum Url: http://http://soapsandmore..smfforfree.com
Yes, check out the site---it's amazing!  There is also a tutorial on how to learn javascript as well.  She has tons of categories, like banners, buttons, cursors, backgrounds, different effects, etc.  I highly recommend it.  Now I just wish I knew exactly where to put the javascript on our board to make it work! LOL  I did get the rain, though, so that's cool!
Logged
simply sibyl
Global Moderator
*
Online Online

Posts: 8552



View Profile WWW
« Reply #3 on: October 28, 2007, 11:13:20 am »

  Now I just wish I knew exactly where to put the javascript on our board to make it work!

Most sites that provide you with javascript codes for web pages or forums give you directions for where to put the code.
Normally it goes in the Header,   however there are some that need to be in the footer.   It totally depends on the code, its intended use;   and as I said most sites give you directions for where you need to put the code.

Do not add them to the css -  they will not work from there. 
Logged

LaundryLady
Global Moderator
*
Offline Offline

Posts: 3061


Multi-Tasking Maven


View Profile WWW
« Reply #4 on: October 28, 2007, 11:21:47 am »

Not all codes will work here.  You might want to post the code you have and see if someone can work with it for you.  I went to take a look at your rain, LOL.  It would be a nice code if it worked in Firefox since I was looking for one that I could use for snow. 
Logged

simply sibyl
Global Moderator
*
Online Online

Posts: 8552



View Profile WWW
« Reply #5 on: October 28, 2007, 11:25:35 am »

Not all codes will work here.  

Yup...  true true true.

And some will not work with all browsers.
You should always test your forum with different browsers so you know what your members will see; run into when visiting your forum.

Best bet is make a test forum -  its a good place to try things that you want to use on your forum.   Try them there first;  tweak them to your liking and make sure they are safe;  work as expected;  before putting them on your "real" forum.

     
Logged

Melody670
SMF For Free Full Member
*
Offline Offline

Posts: 114


View Profile
« Reply #6 on: October 28, 2007, 09:00:32 pm »

Forum Url: http://http://soapsandmore.smfforfree.com
Thank you ladies for trying to help.  I am going to post the javascript I got.  Also, in the directions, it just said to put it in the body.  Thanks for letting me know that putting it in the CSS code is a waste of time..because I definitely tried putting it several places in there! LOL
I'm going to try the header and footer again...perhaps I missed something.  Anyway, thanks for taking a look at it.  Again, any assistance will be greatly appreciated! Smiley  Also, I think a test site is a great idea and I will look on this forum to see if there is a tutorial on how to start one.
Ok, here is the javascript I copied/pasted from  http://www.hypergurl.com/halloweencursor.html I am acknowledging that I did not write this javascript and that I got it from the above-mentioned site.  I do not know javascript and I am not taking credit for this person's work; just as when I get a stylesheet, I always put the original designer's name along with the title when I save it. Smiley  I apologize for getting the two javascripts sites mixed up...one was for the rain, and this very cool site called hypergurl.com is awesome and is where I got the trailing cursor code!  She has tons of good information to offer!  I suggest everyone check out her site!  She makes it so easy for people like me who just don't have the time or, in my case,  brain power to figure all this stuff out!
_____________________________________________________________
<script> /* Cross browser
cursor trailer script Copyright Brian Caputo (bcaputo@icdc.com) distributed by
http://hypergurl.com (Hypergurl) Do not remove this copyright information! */
B=document.all; C=document.layers; T1=new Array("freda.gif",50,50,"freda.gif",50,50,"freda.gif",50,50,"freda.gif",50,50,"freda.gif",50,50,"freda.gif",50,50)
nos=parseInt(T1.length/3) rate=50 ie5fix1=0; ie5fix2=0; for (i=0;i<nos;i++){
createContainer("CUR"+i,i*10,i*10,i*3+1,i*3+2,"","<img
src='"+T1[i*3]+"' width="+T1[(i*3+1)]+" height="+T1[(i*3+2)]+"
border=0>")} function createContainer(N,Xp,Yp,W,H,At,HT,Op,St){ with (document){
write((!B) ? "<layer id='"+N+"' left="+Xp+" top="+Yp+"
width="+W+" height="+H : "<div id='"+N+"'"+"
style='position:absolute;left:"+Xp+"; top:"+Yp+"; width:"+W+";
height:"+H+"; "); if(St){ if (C) write(" style='"); write(St+";'
") } else write((B)?"'":""); write((At)? At+">"
: ">"); write((HT) ? HT : ""); if (!Op) closeContainer(N)
} } function closeContainer(){ document.write((B)?"</div>":"</layer>")
} function getXpos(N){ return (B) ? parseInt(B[N].style.left) : C[N].left } function
getYpos(N){ return (B) ? parseInt(B[N].style.top) : C[N].top } function moveContainer(N,DX,DY){
c=(B) ? B[N].style :C[N];c.left=DX;c.top=DY } function cycle(){ //if (IE5) if
(document.all&&window.print){ ie5fix1=document.body.scrollLeft; ie5fix2=document.body.scrollTop;
} for (i=0;i<(nos-1);i++){ moveContainer("CUR"+i,getXpos("CUR"+(i+1)),getYpos("CUR"+(i+1)))
} } function newPos(e){ moveContainer("CUR"+(nos-1),(B)?event.clientX+ie5fix1:e.pageX+2,(B)?event.clientY+ie5fix2:e.pageY+2
) } if(document.layers) document.captureEvents(Event.MOUSEMOVE) document.onmousemove=newPos
setInterval("cycle()",rate) </script>

« Last Edit: October 28, 2007, 09:47:51 pm by Melody670 » Logged
simply sibyl
Global Moderator
*
Online Online

Posts: 8552



View Profile WWW
« Reply #7 on: October 29, 2007, 09:50:23 am »

  Also, I think a test site is a great idea and I will look on this forum to see if there is a tutorial on how to start one.
 

By making a test site I mean make another forum that you can use for testing purpose.    In other words, sign up for another forum, just as you did the one you have now.    Use IT for trying codes, changing things around, to see how they work,  be SURE they work,  etc before messing with your real forum.
Logged

Melody670
SMF For Free Full Member
*
Offline Offline

Posts: 114


View Profile
« Reply #8 on: October 29, 2007, 09:16:40 pm »

Forum Url: http://http://soapsandmore.smfforfree2.com
I think this is simply a case where this code just doesn't work on these sites. Oh well, I tried.  Thanks ladies, for your help! Smiley
Logged


Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.6 | SMF © 2006-2008, Simple Machines LLC
ServerBeach Coupon
Page created in 0.243 seconds with 17 queries.