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
    Oct 2005
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Conflicting Scripts

    This page: sma rtbrai ntech-com.ds5053.gre ybea rdhosting.com/who-does-it-help/success-stories.asp (remove spaces)

    This script click_toggle.js is conflicting with the supersleight.js script. It's causing the png fix to not work (for IE6) on this page.

    If I disable the body's onload function, the png fix works but then of course the functionallity of the click toggle doesn't do any good.

    The onload is for the click toggle script.
    <body onload="clickMenu('outer','div','more')">

    I can't recall where but I have read something similar about the onload function conflicting with another script and then you add a line of code for one of the scripts but I don't recall where I read that.

    I tried adding the following code to the end of the click_toggle.js script:

    // Run when page loads
    if (window.attachEvent) window.attachEvent("onload", clickMenu);


    However, this didn't work at all.

    Any help would be appreciated.

  • #2
    Senior Coder A1ien51's Avatar
    Join Date
    Jun 2002
    Location
    Between DC and Baltimore In a Cave
    Posts
    2,717
    Thanks
    1
    Thanked 94 Times in 88 Posts
    well you are not including the parameters with your function call

    see if this helps:

    Code:
    if (window.attachEvent) window.attachEvent("onload", function(){ clickMenu('outer','div','more'); });
    Eric
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint]

  • #3
    New Coder
    Join Date
    Oct 2005
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for the help. Unfortunately, that didn't work. The click_toggle.js script becomes non-functional.

    You can review the changes via the same link I provide above.

  • #4
    New Coder
    Join Date
    Oct 2005
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for the help. Unfortunately, that didn't work. The click_toggle.js becomes non-functional.

    You can review the changes via the same link I provide above.

  • #5
    New Coder
    Join Date
    Oct 2005
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Update: I assumed that the 'onload' needed to be removed from the <body> which is why it didn't work with the new line of code you've provided. Once I put that back in, the click toggle and the png fix works fine now.

    Thanks for you help.

  • #6
    New Coder
    Join Date
    Oct 2005
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Disregard my last post. I was looking at it via Firefox. The png still doesn't work with the onload statment in the <body> tag and the click toggle doesn't work if I remove it and use your suggested code.

    Any suggestion would be helpful.

  • #7
    Senior Coder A1ien51's Avatar
    Join Date
    Jun 2002
    Location
    Between DC and Baltimore In a Cave
    Posts
    2,717
    Thanks
    1
    Thanked 94 Times in 88 Posts
    You can not use the onload in the body [it is bad practice anyway!], you need that to also be attachEvent

    Eric
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint]

  • #8
    New Coder
    Join Date
    Oct 2005
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts
    As it stands now, the body onload has been removed but this still doesn't resolve my conflict issue between the two scripts.

  • #9
    New Coder
    Join Date
    Oct 2005
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Ok. Your suggestion does work. What's weird that the hover over the 'Read details >>' doesn't cover the whole length of the text but instead only just the far right portion of it. I didn't realize this until I accidently hovered over to the right more.

    I just now need to resolve the hover issue.

    Thanks for you help.

  • #10
    New Coder
    Join Date
    Oct 2005
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Okay, it's working in IE6 without a hitch including the png fix but now the click toggle doesn't work in Firefox. Put the onload back in the body and the click toggle works but then the IE6 png fix doesn't.

    Please note that the click toggle doesn't work in Safair either but it does work for IE7. Go figure.

    Please advise.
    Last edited by newseed; 10-10-2008 at 08:28 PM.


  •  

    Posting Permissions

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