View Full Version : Problem with Javascript in Mozilla

10-14-2008, 12:54 PM
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.

function toggleDiv(selectedDiv, setting){
var curPolicy = document.getElementById(selectedDiv);
if (curPolicy == null) {

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.


10-14-2008, 01:29 PM
I would expert the alert to fire as I cant locate any of the ids being passed to the function

rnd me
10-14-2008, 07:41 PM
seems to work fine for me in firefox3.

EDIT: and firefox 2.

10-14-2008, 09:36 PM
Found the problem was lowercase/uppercase issues between the 2 files. Fixed and now works perfectly. :)

Arty Effem
10-15-2008, 03:31 PM
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'.

10-15-2008, 03:40 PM
True... unfortunately there's nothing I can do about the redesign. :(