Please help me with this Java-Script problem..
Greetings,
dear Friends..
I have a page with a date java-script embedded in the page and another page with a pop-up on-click javascript.. the thing is when i merge both thte pages it gives me an error with thte scripts liek they dont work...
Is it becuase both the scripts are on-load system or anythign else... And can u please tell me how to use 3-4 scripts on the same page without any conflict...
Thanks..
Busy posted this at 09:08 — 6th November 2001.
He has: 6,151 posts
Joined: May 2001
Could you post the pages so we could see what you have.
check the variables names arent the same,
also you can included functions in other functions so your only running one function off the onload script.
Vincent Puglia posted this at 16:48 — 7th November 2001.
They have: 634 posts
Joined: Dec 1999
Hi Atifprince,
As Busy said, a url would be very helpful.
1) check global variable names (variables declared outside of any function, eg: var counter = 0; ) and function names. If necessary, rename them.
2) if 2 or more functions include a call to setTimeout, you may have to combine the processing into one function
3)you can execute 2 or more scripts from an onLoad, as in:
onLoad="func1();func2();etc">
or
onLoad="combinedFuncs()">
function combinedFuncs()
{
func1();
func2();
}
Vinny
Where the world once stood
the blades of grass cut me still
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.