Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 10 of 10
  1. #1
    New Coder
    Join Date
    Jul 2002
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Adding ascroll script along with several onload scripts

    Fixed the problem of two window.onload but now
    I want to add the window.onscroll

    But it doesn't show up.

    tried several things including this:

    <body onload="runmikescroll() ;fall() ;staticize()">


    but it is certain I am doing something wrong.

    tried adding this as well

    <body onscroll="staticize ;()">

  • #2
    New Coder
    Join Date
    Jun 2002
    Posts
    64
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Create a function that calls them all..

    If you make a function that calls them all..like

    <body onload="javascript:runOnload();">

    and then in your script area use something like this...

    function runOnload()
    {
    runmikescroll();
    fall();
    staticize();
    }

    Hope that helps!

  • #3
    New Coder
    Join Date
    Jul 2002
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Tried as described or so I believe

    But it is not working.


  • #4
    New Coder
    Join Date
    Jul 2002
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Still unable to get it to work

    Ok I will try again
    I have 3 scripts:

    two call on the "onload"
    the other calls "onscroll"


    I can get the two onloads to work but not the
    onscroll

    I tried
    (in the body):

    <body onload="javascript:runOnload();">

    (in the script): added at the end of the first script only!

    function runOnload()
    {
    fall();
    runmikescroll();
    staticize(); <(this being the onscroll)
    }

    This did not work.

    Any suggestions


  • #5
    Regular Coder
    Join Date
    May 2002
    Location
    Seattle, WA
    Posts
    665
    Thanks
    0
    Thanked 0 Times in 0 Posts
    hi,
    exactly what three scripts are you using?

  • #6
    New Coder
    Join Date
    Jul 2002
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    3 Scripts are:

    Autumn leaves- by Kurt Grigg (kurt.grigg@virgin.net)= Onload


    Mike's DHTML scroller (By Mike Hall)= Onload

    Always On Top Content Script=OnScroll


    All 3 are from Dynamic Drive.

  • #7
    Regular Coder
    Join Date
    May 2002
    Location
    Seattle, WA
    Posts
    665
    Thanks
    0
    Thanked 0 Times in 0 Posts
    hi,
    follow direction for installing each script. and then all you would need to do is combine the on load function like this:

    make sure you disable or delete the two onload functions:

    //window.onload=runmikescroll <- delete this line or diable by adding "// in front of the line. same for

    //window.onload=fall



    and add them in the body tag like this:

    <body onload="fall();runmikescroll()">

    no need to include onscroll function.


    your page should look like this:

    <html>

    <head>
    [ Always On Top Content HEAD Script ] here
    </head>

    <body onload="fall();runmikescroll()">
    [ Autumn leaves script ] here


    [ Mike's DHTML scroller scrip ] here


    [ Always On Top Content BODY Script ] here
    </body>

    </html>
    Last edited by speedracer; 07-27-2002 at 09:13 PM.

  • #8
    New Coder
    Join Date
    Jul 2002
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    3 scripts

    So leave the window.onscroll=staticize intact?

    and just revise the two others and add all 3 scripts to the body of the document.

    Is that correct?

  • #9
    Regular Coder
    Join Date
    May 2002
    Location
    Seattle, WA
    Posts
    665
    Thanks
    0
    Thanked 0 Times in 0 Posts
    yes, just make sure to follow the direction on each script exactly, and place the script in the page like i have posted above(in that order). onscroll is not onload event...you cannot(no need to) combine them.

    ps. these script will only will work in IE

  • #10
    New Coder
    Join Date
    Jul 2002
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Worked

    did it on Saturday. Works great!

    THANK YOU!




  •  

    Posting Permissions

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