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 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Mar 2004
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Problem with Javascript in Mozilla

    We have recently had our website redesigned. The site was built using frames (which I hate, but that's another issue), and the navigation uses javascript. The problem we are having at this point in time is that the navigation works fine within I/E and Netscape, but Mozilla is of course giving us a problem.

    The site is www.cthosp.org. Within Mozilla browsers, users are unable to navigate through the site. Any of the buttons clicked from the left-hand navigation generates an error. The error generated within Mozilla is “curPolicy is Null”. The line it is pointing to is underlined below.

    Code:
    function toggleDiv(selectedDiv, setting){
    	var curPolicy = document.getElementById(selectedDiv);
            if (curPolicy == null) {
               alert(selectedDiv);
    } 
    
    	curPolicy.style.display = setting;
            return curPolicy;
    }
    Does any of this make sense to any of the experts here? Is there a quick fix? We're going back to the designer but the site has already launched today and we need to get this resolved.

    Any assistance is greatly appreciated.

    Thanks
    Kellie

  • #2
    Senior Coder
    Join Date
    Mar 2005
    Location
    Portsmouth UK
    Posts
    4,468
    Thanks
    3
    Thanked 495 Times in 482 Posts
    I would expert the alert to fire as I cant locate any of the ids being passed to the function
    Vic

    God Loves You and will never love you less.

    http://www.vicsjavascripts.org/Home.htm

    If my post has been useful please donate to http://www.operationsmile.org.uk/

  • #3
    Senior Coder rnd me's Avatar
    Join Date
    Jun 2007
    Location
    Urbana
    Posts
    4,190
    Thanks
    10
    Thanked 569 Times in 550 Posts
    seems to work fine for me in firefox3.

    EDIT: and firefox 2.
    Last edited by rnd me; 10-14-2008 at 07:50 PM.
    my site (updated 13/9/26)
    BROWSER STATS [% share] (2014/1/19) IE7:0.2, IE8:6.7, IE11:7.4, IE9:3.8, IE10:4.4, FF:18.3, CH:43.6, SF:7.8, MOBILE:27.5

  • #4
    New to the CF scene
    Join Date
    Mar 2004
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Found the problem was lowercase/uppercase issues between the 2 files. Fixed and now works perfectly.

  • #5
    Banned
    Join Date
    May 2006
    Location
    England
    Posts
    664
    Thanks
    0
    Thanked 84 Times in 84 Posts
    Quote Originally Posted by kmattera View Post
    now works perfectly.
    Unless JavaScript is not available, in which case the site is an unusable zombie with no warning given.
    Whoever did that redesign has some explaining to do, without using a phrase like 'small percentage'.

  • #6
    New to the CF scene
    Join Date
    Mar 2004
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    True... unfortunately there's nothing I can do about the redesign.


  •  

    Posting Permissions

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