SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Jul 2007
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Multiple onload events are troubling me

    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?

    I thank you for your help, anyone.

    Arlen

  2. #2
    Guru in training bronze trophy SoulScratch's Avatar
    Join Date
    Apr 2006
    Location
    Maryland
    Posts
    1,838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You shouldn't use ****** dreamweaver rollover code.. if that's it. And, a simple way would be to add an anonymous function.

    addLoadEvent(function() {
    doSomething(param, param, param);
    }


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •