Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Advice on debugging

Status
Not open for further replies.

AndyGroom

Programmer
May 23, 2001
972
GB
I've got various bits of Javascript on my website, but it's become apparent that although it works for 95% of visitors, for others it doesn't work at all even if other Javascript sites do work ok for the same people.

I'm sure it's my amateurish programming that's at fault, but how can I help these people to diagnose the problem? Alternatively, how can I improve or bullet-proof my code so that it stands a better chance of working?

- Andy
___________________________________________________________________
If you think nobody cares you're alive, try missing a couple of mortgage payments
 
1. Is this 5% that are failing all using the same browser?
2. Do they all get the same error at the same place.
3. What is the code that is failing trying to do..

i.e. if you are making an AJAX call then it might be the server you are trying to contact at fault not necessarily the JS code Perae.

Also what browsers have you tested the site yourself with? and from how many various connections, work, home , internet cafe, friends, relatives.

Are you able to visit the place of anyone it is failing so you can see first hand what the problem is?

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
 
Good pointers, thanks.

1. It seems to work fine in IE, but if it's going to fail it fails in Opera and Firefox. However (and it's a big however) there are loads of people using Opera and Firefox who say it works perfectly for them, in fact the guy who raised the issue says it works ok on other machines in the same room who all run Opera.

2. As for errors, I get the impression that none are generated but I need to check that.

3. The code is pretty basic. It chooses a stylesheet by looking in a cookie, and it does a number of document.write statements depending on how the HTM page calls it. I guess I could strip out the functions one by one and see at what point it starts working for these users.

My gut feeling is it's a local setting but I don't know enough about every browser to make helpful suggestions to the users, and if I installed Opera and Firefox chances are the site would work fine as it does for the majority of users.

- Andy
___________________________________________________________________
If you think nobody cares you're alive, try missing a couple of mortgage payments
 
It chooses a stylesheet by looking in a cookie

this could be the main problem, security settings blocking cookies.

do you do a test with JS to see if the cookie is ok and message if not ?





"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top