Page 1 of 3 123 LastLast
Results 1 to 10 of 23

Thread: Runtime Error with script xpmenuv21.js

  1. #1
    Join Date
    Jan 2010
    Posts
    48
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Runtime Error with script xpmenuv21.js

    1) Script Title: xpmenuv21.js

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

    3) Describe problem:

    Having problems with internet explorer running a file (xpmenuv21.js) it was working fine before I had to transfer a site from one server to another. It is running, albeit not as well as it was, in Fire Fox.

    As I load pages on the new site in Internet explorer I get the following error:

    Runtime error
    Line: 245
    Error menuObjArray[0][i].filters.alpha is null or not an object
    Line 245 in the file is:

    Code:
    menuObjArray[0][i].filters.alpha.opacity = 0;
    I'm not very good with javascript so any help would be appriciated.
    Last edited by jscheuer1; 01-13-2010 at 08:49 AM. Reason: dupes after thread merge

  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

    That would tend to indicate that your copy of IE has filters unavailable or that you missed something in the installation of the script.

    If I had a link to your page, I could probably tell which:

    Please post a link to the page on your site that contains the problematic code so we can check it out.


    Regardless, a try/catch could probably eliminate the error if its application to the existing code were well thought out, and get the code to work albeit without any fade effects for that line's object.

    But it might just be a matter of installation, in which case that should be cleared up first.
    Last edited by jscheuer1; 01-13-2010 at 08:50 AM. Reason: for general sense after thread merge
    - John
    ________________________

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

  3. #3
    Join Date
    Jan 2010
    Posts
    48
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    1) Script Title: xpmenuv21.js

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...witchmenu2.htm (I think its this one, like I said I didnt choose the code in the first place)

    http://www.leisure-shop-online.com/test/

    Thats the site.

    I was not the person to put this on the website, I'm just picking up where they left off (and I don't even know who they are)

    The code is working currently on FireFox only, but it used to work fine (before transfer to a new server) on both Internet Explorer and FireFox.
    Last edited by jscheuer1; 01-12-2010 at 05:23 PM. Reason: fix broken link to script on DD

  4. #4
    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

    There could be other problems but your:

    HTML Code:
    <link rel="stylesheet" href="js/sddm.css" type="text/css" media="screen" id="st2" />
    is apparently to an empty file:

    Code:
    http://www.leisure-shop-online.com/test/js/sddm.css
    It may actually be a 404 not found (missing), or even something else, that would depend upon how the server is setup. But it looks to be an empty file. It's contents should be more like so, the actual file from the old server would be better if it had been altered from the original (shown below) that comes with this script:

    Code:
    .navbar
    {
    }  
    
    .mainDiv
    {
    width:185px;
    }
    
    .topItem
    {
      font: bold 12px tahoma,verdana,sans-serif;
      letter-spacing: 0;
      background: url("arrow-up-title.jpg") no-repeat 0 0;
      background-position:center center;
      background-repeat:no-repeat;
      border: none;
      width: 185px;
      height: 25px;
      color: #215dc6;
      cursor:pointer;
      text-indent:10px;
    }
    
    .topItemOver
    {
      text-indent:10px;
      font: bold 12px tahoma,verdana,sans-serif;
      letter-spacing: 0;
      background: url("arrow-up-title-on.jpg") no-repeat 0 0;
      background-position:center center;
      background-repeat:no-repeat;
      height: 25px;
      width: 185px;
      color: #428eff;
      cursor:pointer;
    }
    
    .topItemClose
    {
      text-indent:10px;
      font: bold 12px tahoma,verdana,sans-serif;
      letter-spacing: 0;
      background: url("arrow-down-title.jpg") no-repeat 0 0;
      background-position:center center;
      background-repeat:no-repeat;
      height: 25px;
      width: 185px;
      color: #215dc6;
      cursor:pointer;
    }
    
    
    .topItemCloseOver
    {
      text-indent:10px;
      font: bold 12px tahoma,verdana,sans-serif;
      letter-spacing: 0;
      background: url("arrow-down-title-on.jpg") no-repeat 0 0;
      background-position:center center;
      background-repeat:no-repeat;
      height: 25px;
      width: 185px;
      color: #428eff;
      cursor:pointer;
    }
    
    
    
    .dropMenu
    {
      font: bold 11px tahoma,verdana,sans-serif;	
      background-color: #d6dff7;
      color: #000;
      border: 1px solid #FFFFFF;
      border-width: 0 1px 1px 1px;
      filter:alpha(opacity=100);
      padding-top:5px;
      padding-bottom:5px;
    }
    
    .subMenu
    {
       display:block;
    }
    
    .subItem
    {
       margin-left:10px;
       margin-top:2px;
       height:18px;
       font: 11px tahoma,verdana,sans-serif;	
       text-decoration:none;
       color: #215dc6;
       
    }
    
    .subItem a
    {
       margin-left:23px;
       font: 11px tahoma,verdana,sans-serif;	 	
       text-decoration:none;
       color: #215dc6;
    }
    
    .subItemOver
    {
       margin-left:10px;
       margin-top:2px;
       font: 11px tahoma,verdana,sans-serif;	  
       height:18px;
       color: #428eff;
    }
    
    .subItemOver  a
    {
       margin-left:23px;
       font: 11px tahoma,verdana,sans-serif;
       cursor:pointer;	
       color: #428eff;
       text-decoration:underline;
       cursor:pointer;
    }
    
    
    .drop
    {
       border-left:1px solid black;
       border-right:1px solid black;	
    }
    Without the filter for the .dropMenu class as declared in it, IE will give that error.
    - John
    ________________________

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

  5. #5
    Join Date
    Jan 2010
    Posts
    48
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Thanks for your reply! The file was actually empty on the old server as well but we did have a malicious attack on the server and some of the files got corrupt. I will try adding this code in and see if that makes the drop down work. I will let you know if this works or not. Thanks again for helping.

    EDIT: Thanks very much this code got the drop down working - but with one error I can't get a notification for. The colours etc are completely off but thats fine I can fix that. Thank you kindly!
    Last edited by Aravona; 01-13-2010 at 10:56 AM.

  6. #6
    Join Date
    Jan 2010
    Posts
    48
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    I'm now getting a second error, which I didn't notice on the other computer as I dont get javascript notifications (I just got the usual 'done but with errors' no explanation)

    The new error says:

    line 206:
    error: exception occured

    this is line 206:
    Code:
    tmpStr2 = String("." + itemContainerDiv.childNodes.item(lastmenuNum).className);

  7. #7
    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

    I'm not getting that error. I'm getting these two:

    Error: ddsmoothmenu is not defined
    Source File: http://www.leisure-shop-online.com/test/
    Line: 18
    which refers to the fact that:

    HTML Code:
    <script type="text/javascript" src="ddsmoothmenu.js">
    which points to:

    Code:
    http://www.leisure-shop-online.com/test/ddsmoothmenu.js
    is a 404 not found. And:

    Error: document.styleSheets[r] is undefined
    Source File: http://www.leisure-shop-online.com/test/js/xpmenuv21.js
    Line: 157
    which is probably because the sddm.css file is no longer linked to the page. This stylesheet (even if empty) must be linked to the page.
    - John
    ________________________

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

  8. #8
    Join Date
    Jan 2010
    Posts
    48
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Sorry thats wrong now, I've already posted up a new problem as I've had to change the navagation I'm using. So I've removed the old script and am trying (and failing) to put this new one in.


    http://www.dynamicdrive.com/forums/s...ad.php?t=51603
    Last edited by Aravona; 01-13-2010 at 04:07 PM.

  9. #9
    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

    My remarks as of this typing still apply to that page, mostly. If you are no longer using xpmenuv21.js, remove the script, it's causing an error. If you are using Smooth Navigational Menu (v1.31), ddsmoothmenu.js must be available to the page.
    Last edited by jscheuer1; 01-13-2010 at 04:24 PM. Reason: as of this typing
    - John
    ________________________

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

  10. #10
    Join Date
    Jan 2010
    Posts
    48
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    I had a mistake with my index page where i wasnt referencing the .js file path properly. Its correct now however I'm still not getting the side-out part of the menu.

    The new javascript isnt in the same place as the old one and as far as I can tell I've removed the links to it.

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
  •