» Log in
User Name:

Password:

Not a member yet?
Register Now!
» Online Users: 43
0 members and 43 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 JS in themes/BlackDog/header.html within the Purged Topics forums, part of the NM Staff category; http://web.sysrq.no/appolyon/21pzr/index.php I want the horizontal buttons to work like is working in : http://...


Go Back   Nukemods Forum » NM Staff » Purged Topics

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-25-2003, 12:22 AM
Junior Member
 
Join Date: Jan 2003
Posts: 83
JS in themes/BlackDog/header.html
http://web.sysrq.no/appolyon/21pzr/index.php

I want the horizontal buttons to work like is working in :
http://web.sysrq.no/appolyon/21pzr/t...JS/header.html
when rollover "Panzer" button to have the JS Menu...

I tried over 2h..but i keep having errors:
1) because of the Preloading images ..i don't know how to get rid of
Code:
<body onLoad="MM_preloadImages('images/Nav...
which throws me errors which i can't identify
2) Not even without preload function, rollover is working ... see http://web.sysrq.no/appolyon/21pzr/index.php for this problem
3) JS menus, i couldn't see the code working... i'm still stucked on rollovers with preload

All JS are generated by Macromedia Dreamweaver....i'm aware that is not best way to embeed JS but i don't have any other good option...i searched on the net more than 1h to find something ...any suggestions for JS which are proper for my needs and easy to be implemented into nuke are more than welcome
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 05-25-2003, 01:50 AM
Senior Member
 
Join Date: Sep 2002
Posts: 2,905
Try this.
http://www.nukecops.com/postp15903.h...ghlight=#15903
Also, try manually editing the file with a Tet editor like UltraEdit or EditPlus. Add the script code that way. Dreamweaver can and will mess up text files like php. Especially where html is concerned and with themes.

mikem
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 05-25-2003, 09:35 AM
Junior Member
 
Join Date: Jan 2003
Posts: 83
i spend more than 4h on nukecops and phpnuke.org... humpa is talking about 6.5 and i only have 6.0 and header.html and not php.

Raven is talking about a direct usage of JS and not like i have...fuction definitions (in <HEAD>) and calls in <BODY>.

Still i can't figure out where/how i can insert fuction definitions (swapImage, swapImageRestore, findObj, Menu) and in what way i should make the JS calls in my header.html?

I get rid of DW ... i use it only for generating JS code..now working with PHPEdit.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 05-25-2003, 06:38 PM
Junior Member
 
Join Date: Jan 2003
Posts: 83
1 step forward but i couldn't make the rollover to work.

What i did:
As Raven from nukecops said in http://nukecops.com/postt2548.html

I added my function definitions in includes/meta.php:

i put my functions definitions using that variable as Raven said but i can't paste the exact code.... http://web.sysrq.no/appolyon/21pzr/m...iewtopic&p=334 Code #1 ...and also View Source too see my functions definitions working

And now i'm able to see this code into <head>

But now i don't know how to call the functions on my image to make rollover work...in html i have:

http://web.sysrq.no/appolyon/21pzr/m...iewtopic&p=334 Code #2

I don't have any errors but still the rollover is not working.

Please reply here ... ty Mikem for understading...but i wasn't able to paste the code here ...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 05-25-2003, 06:48 PM
Senior Member
 
Join Date: Sep 2002
Posts: 2,905
ok, here's how I got the rollover image effect to work without using Javascript

example of one of my rollover images.

Code:
	[img]themes/XPSilver/images/home.gif[/img]
maybe that will help some...

mikem
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 05-25-2003, 07:13 PM
Junior Member
 
Join Date: Jan 2003
Posts: 83
what do u mean by WITHOUT Javascript?
cause i see u have same code as mine except 'id' in img
and i suppose you have insert also the functions definitions somewhere... can you tell me where? ...cause i added it in meta.php as Raven said and is visible in the site


I added your code but still not working...no errors... when i look at the code when the site is executed by the webserver i see
Code:
   [img]themes/BlackDog/images/NavBarW_02.gif[/img]
this is the reason why my rollover is not working? can you help me and tell how can i fix it?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 05-25-2003, 09:40 PM
Senior Member
 
Join Date: Sep 2002
Posts: 2,905
My bad. I guess I did use Javascript. Been a long time since I've done this...

OK here we go

Here's my Javascript theme file It's my theme.php file for my theme
Theme File

Here's the imageswap.js file it refers to that I used.
FILE HERE

Then I used the above line I gave you as the image swap lines for the rollover images.

I can't post the code because the forums won't let me post anything with the " script" in it... :?

mikem
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 05-25-2003, 11:40 PM
Junior Member
 
Join Date: Jan 2003
Posts: 83
Nope... still doesn't work...
I used your imageswap.js and same way u included it ... i can see the js file included right after </head> and before of <body>.. this is ok?
Still the problem about the call (i'm using your code for images) persists and i belive this the cause which makes not to work well:

Code:
   [img]themes/BlackDog/images/NavBarW_02.gif[/img]
As you can see the JS call is damaged by all those \ .. is because i have header.html and maybe you had header.php? Any solution how to "throw" JS corectly?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 05-26-2003, 10:37 AM
Junior Member
 
Join Date: Jan 2003
Posts: 83
I fix it using another script

This is the function definition and i added it like Raven said (but i put it in includes/meta.php to be sure is in <header> tag)... linking an outside js file doesn't seremed to work (i made some tests)

Code:
function init() {
  if (!document.getElementById) return
  var imgOriginSrc;
  var imgTemp = new Array();
  var imgarr = document.getElementsByTagName('img');
  for (var i = 0; i < imgarr.length; i++) {
    if (imgarr[i].getAttribute('hsrc')) {
        imgTemp[i] = new Image();
        imgTemp[i].src = imgarr[i].getAttribute('hsrc');
        imgarr[i].onmouseover = function() {
            imgOriginSrc = this.getAttribute('src');
            this.setAttribute('src',this.getAttribute('hsrc'))
        }
        imgarr[i].onmouseout = function() {
            this.setAttribute('src',imgOriginSrc)
        }
    }
  }
}
onload=init;
And the calls are very easy and clean:
Code:
[img]on.gif[/img]
Now the hard part..the JS Menus :cry: .... any other JS Menus which have a very simple call of the function? (seems this was the problem)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 05-26-2003, 12:03 PM
Junior Member
 
Join Date: Feb 2003
Location: Garland, Texas USA
Posts: 42
Look into this one. http://www.burmees.nl/menu/menus.htm
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
Fisubsilver: content dissapears when editing header.html C5C6 Theme packs 4 02-10-2005 07:49 AM
Copying header.html file into other directory to work there MurphDog Site design 0 04-24-2003 08:59 AM
Cusomizing the Header Html XtraX Site design 0 04-23-2003 10:29 PM
BlackDog theme Colin_da_Killer Theme packs 0 04-19-2003 02:35 PM
Changes made to Header.html causes alignment problems Pha17tasy Theme packs 3 03-20-2003 09:22 AM


All times are GMT -5. The time now is 08:17 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