Nukemods Forum  
» Log in
User Name:

Password:

Not a member yet?
Register Now!
» Online Users: 89
7 members and 82 guests
besxjtphmo3aq7e, haingrcolky3rao, ora6fngecounty5, pri6qntabledikg, pro7mfessional6, XRumerTest, zcchenenxiop
Most users ever online was 611, 03-21-2008 at 11:10 PM.
» .::.
tattoo fonts
http://www.checkoutmyink.com/category/tattoo-fonts-tattoo

Go Back   Nukemods Forum > NM Staff > Purged Topics

Reply
 
LinkBack Thread Tools Display Modes
Adding Javascript
Old
  (#1 (permalink))
Junior Member
 
Status: Offline
Posts: 7
Join Date: Mar 2003
Adding Javascript - 03-14-2003, 08:19 AM

How do I add new Javascript? Can I simply add it to the Javascript.php page? below is what I want to add...if anyone can show me how it's done that would be great!!!

<script>

/*
Gradual-Highlight Image Script II-
By J. Mark Birenbaum (birenbau@ugrad.cs.ualberta.ca)
Permission granted to Dynamicdrive.com to feature script in archive
For full source to script, visit http://dynamicdrive.com
*/

nereidFadeObjects = new Object();
nereidFadeTimers = new Object();

/* object - image to be faded (actual object, not name);
* destop - destination transparency level (ie 80, for mostly solid)
* rate - time in milliseconds between trasparency changes (best under 100)
* delta - amount of change each time (ie 5, for 5% change in transparency)
*/

function nereidFade(object, destOp, rate, delta){
if (!document.all)
return
if (object != "[object]"){ //do this so I can take a string too
setTimeout("nereidFade("+object+","+destOp+","+rat e+","+delta+")",0);
return;
}

clearTimeout(nereidFadeTimers[object.sourceIndex]);

diff = destOp-object.filters.alpha.opacity;
direction = 1;
if (object.filters.alpha.opacity > destOp){
direction = -1;
}
delta=Math.min(direction*diff,delta);
object.filters.alpha.opacity+=direction*delta;

if (object.filters.alpha.opacity != destOp){
nereidFadeObjects[object.sourceIndex]=object;
nereidFadeTimers[object.sourceIndex]=setTimeout("nereidFade(nereidFadeObjects["+object.sourceIndex+"],"+destOp+","+rate+","+delta+")",rate);
}
}

</script>

Thanks!
Dman
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#2 (permalink))
Senior Member
 
Status: Offline
Posts: 619
Join Date: Oct 2002
Location: Alabama, USA
03-14-2003, 08:51 AM

I notice your site uses frames. You'll need to add the scritp you posted to the <head> section, before the <body>, for each frame page you want the effect to show in. Did you read the instructions at dynamicdrive?
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#3 (permalink))
Junior Member
 
Status: Offline
Posts: 7
Join Date: Mar 2003
03-14-2003, 11:10 AM

My apologies! The site my banner linked to is my old site. I have that fade effect working at that site using the similar explanation you gave above. My real query is regarding the new site I am working on using PHP-Nuke...

http://O-Company-BF1942.com/html/

Notice the links in the lower right block. The Javascript I posted above is supposed to fade those until you mouseover them. I am wondering how to add that script text to this new site? Do I add it to the Javascript.php page? If so, is there anything specific I need to know to do so? If not, how else can I add it since it appears the html is created dynamic when the site is viewed.

Thanks for your first reply.

Dman
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#4 (permalink))
Senior Member
 
Status: Offline
Posts: 619
Join Date: Oct 2002
Location: Alabama, USA
03-14-2003, 11:17 AM

Yes put your script at the very top ov your header.html file (in you theme folder), put the script before anything on that page. If you have a problem after that I will show you another way usung php in the theme.php file.
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#5 (permalink))
Junior Member
 
Status: Offline
Posts: 7
Join Date: Mar 2003
03-14-2003, 12:03 PM

That did it! Thanks a million!!
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How Do I insert javascript into a block? lkoelbel Nuke 7.x - Blocks 0 04-05-2006 12:41 PM
Javascript Popup kevbocat Site design 0 06-08-2003 03:16 PM
JavaScript in nuke iphoenix Site design 15 05-31-2003 01:29 PM
Javascript help.. bosanac Site design 0 04-30-2003 05:06 PM
Blocks and JavaScript denis Purged Topics 1 04-09-2003 03:16 PM




vBulletin Skin developed by: vBStyles.com


LinkBacks Enabled by vBSEO 3.3.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31