onload problem - JavaScript

They have: 12 posts

Joined: Sep 2001

Hi everyone!

Have a question about a onload code that’s nested in my body tag and a second code nested inside a JavaScript on the same page. First let me try to explain what I’m doing. The home page I’m working on is located here: goguides.org (pretty plain right?) and I wanted to spice it up a little and decided to add a navigation link at the top, a side menu to the left, and a watermark in the middle.

Now here’s the problem. The watermark script works fine with both scripts but when I added the fading script text it killed the navigation bar. If I take out the onload command from the fading script the nav bar works. If I take the onload command out that’s nested inside the body tag then the fading text will work. But they will not work together.

You can see both pages here with each code working:

http://www.goguides.org/repair/index1.html

&

http://www.goguides.org/repair/index.html

Now how can I get them both working together? Here’s the body code:

Here’s the code located inside the fading script:

window.onload=changecontent

And these are test pages I’m working on for my group. I’m not even sure if they will become our home page look. I’m just putting them together to see what it would look like.)

Any help with this problem would be greatly appreciated!

zag

Busy's picture

He has: 6,151 posts

Joined: May 2001

It doesnt load in Netscape 4.7, just get a line at the top saying "//Dynamic-FX slide in menu v6.5 (By maXimus, [email protected]) //Site: http://maximus.ravecore.com/ //For full source,"

no slide in menu, no pull down menu, no fade in on either index or index1 and no watermark.

in IE that little white box with text flashing away (really annoying) works on the index but not the index1, is this the fade in script you mentioned?

In Netscape 6 you have the slide in menu, no top pull down menu or no flashing text box, same for both pages.

Javascript (dhtml) can slow your pages down, I found on a 56k modem your top menu is last to load and takes a while to get there (on IE), I would personally loose at least one of your toys as it would improve your loading time and display problems.

many people over look the size of the .html file when adding up the overall page size. they just look at the graphics.

just had a quick look at your coding, you have an extra "body" in your body tag, not that it will fix your problem, just thought I'd bring it to your attention.
also notice your using php to get the time from the body and display it in the meta, for one doesnt it have it be a .php file for that to work? and I could be wrong here but dont the meta tags display before the code?

They have: 12 posts

Joined: Sep 2001

Hi Busy,

Hmmmm, You just pointed out enough problems on those two pages that I’m going to abandon using scripting all together on the main page. Guess I’ll go with tables for the entire layout. Thanks!!!

And I was moving code all over the page trying to get the scripts working together and more importantly I hadn’t cleaned-up any of the code yet. But NO, I hadn’t noticed the two body tags. ~laugh~

As for the php it was inserted in a effort to correct a php cache problem with our php scripts.

<?php
$rightnow
= gmdate("D, d M Y H:i:s") . "GMT";
?>

Again thanks a million.)

zag

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.