Results 1 to 2 of 2

Thread: Form Dependency Not Working With Top Navigational Menu Script

  1. #1
    Join Date
    Jul 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Form Dependency Not Working With Top Navigational Menu Script

    Hello. Your form dependency is working great, but when included on a page with the top navigational menu script, the form dependency won't work.

    Test Pages:
    www.cecilelicad.com/test/test.html
    www.cecilelicad.com/test/test2.html
    www.cecilelicad.com/test/test3.html

    Pls help....

  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

    Quote Originally Posted by francoom View Post
    Hello. Your form dependency is working great, but when included on a page with the top navigational menu script, the form dependency won't work.
    These are two older scripts and their authors aren't around. Oh and:

    Your page is in violation of Dynamic Drive's usage terms, which, among other things, state that the script credit must appear in the source code of the page(s) using the script. Please reinstate the notice first.


    And:

    Please post new questions in a new thread like here where I've moved this, and:

    Warning: Please include a link to the DD script(s) in question in your post. See this post for more information.


    That said, it's an onload conflict. Both scripts want control of the onload event. To fix it, replace:

    Code:
    <script type="text/javascript">
    window.onload = function() {
        setupDependencies('weboptions');
      };
    </script>
    with:

    Code:
    <script type="text/javascript">
    (function(){
    	var func = function() {
    		setupDependencies('weboptions');
    	};
    	if (window.addEventListener){
    		window.addEventListener('load', func, false);
    	}
    	else if (window.attachEvent){
    		window.attachEvent('onload', func);
    	}
    })();
    </script>
    - John
    ________________________

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

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
  •