Debt Consolidation - Internet advertising - Web Design Forums - Communications Technology Articles - Debt Consolidation

PDA

View Full Version : A multi-event onload function...please help...


pkunzipula
Mar 21st 2008, 8:11 pm
I'm trying to create a multiple-function onload event.

I have a 6-function .js file.
The first 4 functions exist just to switch images.
The 5th is for a dynamic zebra-table effect.
The 6th is the addLoadEvent for the first 5. Looks like this...

addLoadEvent(MM_swapImgRestore);
addLoadEvent(MM_preloadImages);
addLoadEvent(MM_findObj);
addLoadEvent(MM_swapImage);
addLoadEvent(striper);

The thing is...

MM_findObj and striper have additional arguments that go...

function MM_findObj(n,d)

and

function striper(parentElement,parentClass,childElement,childClass)

Where, when and how do I define these arguments? Please explain thoroughly, as I am new at this.

I thank you for your help, anyone.

Arlen

Logic Ali
Mar 21st 2008, 8:41 pm
The thing is...

MM_findObj and striper have additional arguments that go...

function MM_findObj(n,d)

and

function striper(parentElement,parentClass,childElement,childClass)

Where, when and how do I define these arguments?

addLoadEvent( function(){ striper( param1,param2[,other params]); } );

lephron
Mar 22nd 2008, 2:31 am
or you could simplify it by creating a function that calls all these. Eg:


function myLoad()
{
function1(arg1, arg2, arg3);
function(arg4);
function(arg2, arg3);
}

addLoadEvent(myLoad);