PDA

View Full Version : Multiple scripts on same page


kindred2
09-15-2003, 12:23 AM
Hi all,

A few weeks ago I asked for help with getting 2 picture cubes to work on the same page here... http://www.codingforums.com/showthread.php?s=&threadid=25559 (http://)

Graeme was nice enough to figure it all out for me, but now I'm wanting to add this menu to the page http://www.dynamicdrive.com/dynamicindex1/hvmenu/index.htm (http://)


When trying to do this on a page that contains the first script mentioned here, nothing is showing up. It works fine on a page without the other script, but I would like to use them together.

Can someone please help?

Sincerely,

Kindred2

kindred2
09-15-2003, 11:18 AM
Is there no one out there willing to help me with this?

No suggestions?

I find it very hard to believe that no one here is up to this challenge as I see everyone helping others with some pretty difficult things.... is this that much more difficult?


Sincerely,

Kindred2

Kor
09-15-2003, 03:03 PM
I tried an answer to a similar problem some days ago, here it was:


It might be the "classical" onload problem.

Check if both functions have onload statesments. They can be in BODY tag, as onload="somefunction()") or in code, as window.onload = something, or onload=something

If so, you have to combine the statesment in a single one (and deleted the originals moved.

- you may put both in BODY tag as onload = "function1(); function2()"
- you may move one function from one code to the other, something like



code:--------------------------------------------------------------------------------
window.onload = init;
function init() {
function1();
function2();// this one was moved from code 2
}
--------------------------------------------------------------------------------

... anyway, make sure that there are no more that one onload statesment

kindred2
09-15-2003, 10:12 PM
Just a quick thanks for the reply.... but I wouldn't know exactly where to begin changing things like that!

It is okay though, I finally got a reply from the author of the menu script and found all I had to do was move the menu script below the picture cube script!

I wish all problems were that easy to fix!!

I do believe as much as I've been using javascripts lately though that I would like to look into a beginners course in learning it! Any suggestions where to start anyone?

I would like to maybe be able to help someone else someday since you all have been so great as to help me!

Sincerely,

Kindred2