Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-14-2008, 12:54 PM   PM User | #1
kmattera
New to the CF scene

 
Join Date: Mar 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
kmattera is an unknown quantity at this point
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
kmattera is offline   Reply With Quote
Old 10-14-2008, 01:29 PM   PM User | #2
vwphillips
Senior Coder

 
Join Date: Mar 2005
Location: Portsmouth UK
Posts: 4,358
Thanks: 3
Thanked 458 Times in 445 Posts
vwphillips is a jewel in the roughvwphillips is a jewel in the roughvwphillips is a jewel in the rough
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.uk/

If my post has been useful please donate to http://www.operationsmile.org.uk/
vwphillips is offline   Reply With Quote
Old 10-14-2008, 07:41 PM   PM User | #3
rnd me
Senior Coder

 
rnd me's Avatar
 
Join Date: Jun 2007
Location: Urbana
Posts: 3,469
Thanks: 9
Thanked 466 Times in 450 Posts
rnd me is a jewel in the roughrnd me is a jewel in the roughrnd me is a jewel in the rough
seems to work fine for me in firefox3.

EDIT: and firefox 2.
__________________
my site (updated 5/13)
STATS (2013/5) HTML5:90.2% MOB:14% IE7:0.5% IE8:8.6% IE9:9.8% IE10:10%

Last edited by rnd me; 10-14-2008 at 07:50 PM..
rnd me is offline   Reply With Quote
Old 10-14-2008, 09:36 PM   PM User | #4
kmattera
New to the CF scene

 
Join Date: Mar 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
kmattera is an unknown quantity at this point
Found the problem was lowercase/uppercase issues between the 2 files. Fixed and now works perfectly.
kmattera is offline   Reply With Quote
Old 10-15-2008, 03:31 PM   PM User | #5
Arty Effem
Banned

 
Join Date: May 2006
Location: England
Posts: 664
Thanks: 0
Thanked 84 Times in 84 Posts
Arty Effem can only hope to improve
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'.
Arty Effem is offline   Reply With Quote
Old 10-15-2008, 03:40 PM   PM User | #6
kmattera
New to the CF scene

 
Join Date: Mar 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
kmattera is an unknown quantity at this point
True... unfortunately there's nothing I can do about the redesign.
kmattera is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:55 AM.


Advertisement
Log in to turn off these ads.