...

View Full Version : Web app failing on firefox but works on others



RickP
11-29-2012, 09:37 PM
I'm learning javascript and so I created an app to track my golf stats. This app uses local storage and is 100% client side (it never goes back to the server).

It works fine in IE (PC & WP7), safari on iPad 3, chrome, & opera, but in firefox something is wrong. I break out "dialogs" by div tags and hide/show them as the application requires, so you should only see 1 div tag at a time. In firefox it's showing all the div tags at once which is leading me to believe it's hitting an error and not running my javascript that controls the show/hide logic.

How am I supposed to find the issue that's causing this on firefox? What debugging tools are out there? Remember I'm new at web development.

Below is the web app

http://mygolfscore-app.com/

WolfShade
11-29-2012, 09:42 PM
FF has an error console. It's accessed differently depending upon version, but basically look for Web Developer main-menu, or something like FireBug that will show JavaScript errors. See if any error messages are appearing.

Also, just double-check in IE to make sure that there isn't a yellow triangle with an exclamation point in the lower-left corner of the browser. That's IE's error indicator.

Logic Ali
11-29-2012, 10:06 PM
There's nothing wrong, you must have JS disabled.

WolfShade
11-29-2012, 10:12 PM
There's nothing wrong, you must have JS disabled.
Or security settings so high that it appears to be disabled.

RickP
11-29-2012, 10:23 PM
So it's saying btnCurrentRound isn't defined at the line I try to set it's disabled property in the onready event. But it is defined.

Are you saying it works for you guys and you get no errors? You only see 4 buttons on the page when you first go there?

Javascript is enabled. Using FF 10.

The fact that it's giving the error on line 35 means it is running the other javascript above it and it's branching in the if statement just fine. It's like for some reason it doesn't see that control though.

Yeah I try to access another control from the onready() event and it fails on that. The DOM should be loaded so it should allow access right? I type the id specifically instead of using getElementId() is that a problem?

RickP
11-29-2012, 10:57 PM
I changed btnCurrent.disabled to document.getElementById("btnCurrent").disabled and it worked now. Can't FF handle using the id like that directly? The other browsers seem to do just fine with that.

Of course the rest of the page doesn't work because I use the id name directly like that in the entire page :/

Nevermind, seems I should be using document.getElementById() or jQuery for this. That kinda sucks as it's nice being able to access by id like this. Will make the changes to the page.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum