» Log in
User Name:

Password:

Not a member yet?
Register Now!
» Online Users: 54
0 members and 54 guests
No Members online
Most users ever online was 611, 03-21-2008 at 11:10 PM.
» .::.
Web Hosting - web hosting, dedicated servers and web design services
Online Degree - search for 1000+ online degrees, online colleges & online universities.
Tattoo - we are a group of tattoo enthusiasts
Gexa Energy - your absolute best choice in electric service
Texas electricity - save on electric rates
Oral Chelation - initial cleansing of your veins & arteries

Register Now! Contact Us

About this Page
This is a discussion on Adding Javascript within the Purged Topics forums, part of the NM Staff category; How do I add new Javascript? Can I simply add it to the Javascript.php page? below is what I ...


Go Back   Nukemods Forum » NM Staff » Purged Topics

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-14-2003, 08:19 AM
Junior Member
 
Join Date: Mar 2003
Posts: 7
Adding Javascript
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
  #2 (permalink)  
Old 03-14-2003, 08:51 AM
Senior Member
 
Join Date: Oct 2002
Location: Alabama, USA
Posts: 619
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
  #3 (permalink)  
Old 03-14-2003, 11:10 AM
Junior Member
 
Join Date: Mar 2003
Posts: 7
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
  #4 (permalink)  
Old 03-14-2003, 11:17 AM
Senior Member
 
Join Date: Oct 2002
Location: Alabama, USA
Posts: 619
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
  #5 (permalink)  
Old 03-14-2003, 12:03 PM
Junior Member
 
Join Date: Mar 2003
Posts: 7
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


All times are GMT -5. The time now is 07:50 AM.


Design by Vjacheslav Trushkin, color scheme by ColorizeIt!.

LinkBacks Enabled by vBSEO 3.1.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