Results 1 to 3 of 3

Thread: Chained Select Menu / Cross Browser marquee Problems

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

    Default Chained Select Menu / Cross Browser marquee Problems

    Script: Chained Select Menu
    http://www.dynamicdrive.com/dynamici...ects/index.htm

    and

    Script: Cross Browser Marquee
    http://www.dynamicdrive.com/dynamicindex2/cmarquee.htm

    Now i know that the site recommendation is that help is unlikely in script+script conflicts but i honestly have no where else to turn at the moment...

    I'm essentially a network engineer who has moved into a less hectic enviroment of more overall IT role within one company (so my primary focus has previously been technical network support) but due to job requirements i have taught myself a reasonable amount of knowledge of ASP in the last 2 months but inorder to get myself to a point where i can debug this problem, i would have to gain substantial knowledge of javascript which (although i plan to) i do not currently have either the time to do either personally professionally to learn well enough to fix this problem...

    Anyway, i was really hoping someone could have a look at a page where these two scripts are combined and help me figure out why they do not work together or just give me a few pointers on what to look for since the obvious things like overlapping variable names are not why these two scripts don't work together.

    So far i have adapted both of these scripts to run from a SQL db and originally i thought it was maybe to do with that, but i have done a test where i added both the original scripts to a flat html page and i get the same problem. The drop down list bascially does not populate although a "show source" check indicates that all the imporant parts of both scripts are present. The only way i can get the drop down lists to populate is to remove the <SCRIPT></SCRIPT> reference to the the js file used in the Marquee Scroller which leaves me to believe there is something in the Marquee script which is overiding the dropdown script. Unfortunately, both of the the effects created by these scripts have already been designated as vital to the project i am working on as so removing one is not really an option.

    I would also like to take the time to say that this site is bar far and away the best site i have found on the web for reference material and my thanks go out to both the site hosts/creators and the coders who submit the material on it.

    I would be extremely grateful if one of the experts on here could take a moment over the weekend to have a look at this slightly specific scenario and lend a hand in this problem.

    Thanks in advance for any help you can provide...

    Spoons

  2. #2
    Join Date
    Oct 2005
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Update

    Ok, if anyone has the same problem with these scripts clashing i have figured out the reason why...

    In the script for the Cross Browser Marquee, there is a function called populate which at the end of it has the line window.onload=populate (see below).

    Code:
    function populate(){
    if (iedom){
    cross_marquee=document.getElementById? document.getElementById("iemarquee") : document.all.iemarquee
    cross_marquee.style.left=parseInt(marqueewidth)+8+"px"
    cross_marquee.innerHTML=marqueecontent
    actualwidth=document.all? temp.offsetWidth : document.getElementById("temp").offsetWidth
    }
    else if (document.layers){
    ns_marquee=document.ns_marquee.document.ns_marquee2
    ns_marquee.left=parseInt(marqueewidth)+8
    ns_marquee.document.write(marqueecontent)
    ns_marquee.document.close()
    actualwidth=ns_marquee.document.width
    }
    lefttime=setInterval("scrollmarquee()",20)
    }
    window.onload=populate
    The window.onload clashes with the <BODY onload=""> event of the Chained Select Menu. Essentially the BODY onload event never fires.

    The way i got round this was to comment out or remove that window.onload=populate line and ammend the body onload event to the following.

    Code:
    <BODY onload="initListGroup('chainedselectmenu', document.listmenu0.firstlevel, document.listmenu0.secondlevel, document.listmenu0.thirdlevel, 'saveit');populate()">
    i.e. i added the populate function to the body onload event rather than using the window.onload method.

    I hope this helps anyone with similar problems with scripts clashing.


  3. #3
    Join Date
    Jun 2007
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you for sharing your information!

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
  •