Results 1 to 3 of 3

Thread: 2 JS files possibly conflicting

  1. #1
    Join Date
    Oct 2005
    Posts
    65
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default 2 JS files possibly conflicting

    I'm working on a dating site which has a dynamic javascript menu and on one page a dynamic JS progress bar. For some odd reason, when I add the progress bar, no matter where I place it in code, the menu ends up in the top left corner.

    http://www.still-looking.com/new_sit...ofile_TEST.asp

    This is the page that's having the trouble. If you'd like to see the way the menu is supposed to look like, please go here.

    http://www.still-looking.com/new_site

    If anyone has any suggestions please post. Thank you guys so much!

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Find this line in percent_bar.js:

    Code:
    window.onload=progressBarInit;
    Replace it with:

    Code:
    if ( typeof window.addEventListener != "undefined" )
        window.addEventListener( "load", progressBarInit, false );
    else if ( typeof window.attachEvent != "undefined" )
        window.attachEvent( "onload", progressBarInit );
    else {
        if ( window.onload != null ) {
            var oldOnload = window.onload;
            window.onload = function ( e ) {
                oldOnload( e );
                progressBarInit();
            };
        }
        else
            window.onload = progressBarInit;
    }
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Oct 2005
    Posts
    65
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thank you sooo much! =D

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
  •