Results 1 to 4 of 4

Thread: Help with Drop down/ Overlapping Content

  1. #1
    Join Date
    Feb 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Help with Drop down/ Overlapping Content

    1) Script Title: Drop down/ Overlapping Content

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...lapcontent.htm

    3) Describe problem:

    Hi, ive installed Drop down/ Overlapping Content script and it works very well on ff, but on ie i get this error:

    Line: 117
    Error: 'null' is null or not an object


    Line 117 is:

    Code:
    var subobj=document.getElementById(anchorobj.getAttribute("rel"))
    Besides i get also this message in debug window:

    'dropdowncontent' is undefined.

    Can I solve this problem?
    Last edited by Grey83; 02-03-2010 at 05:31 PM.

  2. #2
    Join Date
    Feb 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I undestand the problem...

    My site is a bulletin board and i've added a php condition to use this script. It's a thing like:

    PHP Code:
    <a href="page.html" <?php  if permission...etc?>id="quickslink" rel="quicks"<?php end condition ?>>CLICK</a>
    Now the problem is that if user has permissions to use the script anything works ok, otherwise users get that error. Is there a method to solving it?

  3. #3
    Join Date
    Aug 2004
    Posts
    10,140
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Inside the .js file, try adding the changes in red below, which checks to see if the drop down DIV actually exists on the page before proceeding to initialize it:

    Code:
     init:function(anchorid, pos, glidetime, revealbehavior){
    		var anchorobj=document.getElementById(anchorid)
    		var subobj=document.getElementById(anchorobj.getAttribute("rel"))
    		if (!anchorobj || !subobj)
    			return
    DD Admin

  4. #4
    Join Date
    Aug 2004
    Posts
    10,140
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Update: Use this code instead:


    Code:
     init:function(anchorid, pos, glidetime, revealbehavior){
    		var anchorobj=document.getElementById(anchorid)
    		if (anchorobj)
    			var subobj=document.getElementById(anchorobj.getAttribute("rel"))
    		if (!anchorobj || !subobj)
    			return
    DD Admin

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
  •