Jump to content

Works on IE 11 but not on Firefox 27


buckibooster

Recommended Posts

I've got a multi-tab web form that works just fine on Internet Explorer (Versions 10 and 11) but not on Firefox (Version 27). I've got the problem narrowed down to two (2) javascripts. They both have a common set of commands that may well be the cause of this problem. The common command is "document.getElementById('Frame or Tab ID').innerHTML". Although I've got it narrowed down to this source, I have no idea why it is happening or what I can do to fix it. I'd like to get this form to work on both platforms (i.e., IE and Firefox). Does anyone have any suggestions?

Link to comment
Share on other sites

Thanks for responding.

 

In the first javascript, the potentially offending line of code is:

document.getElementById('frame2').innerHTML = sScript;

In the second javascript, the potentially offending line of code is:

document.getElementById(sString).innerHTML = "6";
Link to comment
Share on other sites

There's nothing syntactically wrong with those lines. You'll need to say exactly what the problem is, whether you're seeing any Javascript errors in the developer console in your browser, and probably provide code with context rather than individual lines. Those lines look fine as far as the syntax goes, but we don't know anything about the context where they are used. You also haven't said exactly what the problem is.

Link to comment
Share on other sites

What you ask for is difficult. One (1) of the javascripts, which provides the skeletal outline for all of the tabs (i.e., changeTabs), has over 27,000 lines of code. The site can be reached at <my site>. If you look at it with IE and then with Firefox, the problem will be readily apparent.

Edited by buckibooster
Link to comment
Share on other sites

Oh, goodness. This website...

There are better ways to do this, even without PHP.

 

There are many things to look through but this line really has me concerned:

<META content=IE=5.0000 http-equiv=X-UA-Compatible>

Who made this and how many years ago?

 

So finding somewhere to start, you can check the error console. It's showing this error:

ReferenceError: checkboxUpdate is not defined

checkboxUpdate('Home')

It's referring to this part, which I'm not sure where to find

function onload(event) { checkboxUpdate('Home') }
Link to comment
Share on other sites

The answers to your questions Ingolme are:

  1. I wrote that particular section of code over three (3) years ago. That's how long ago I started on this tool. I can't remember that far back but I'm reasonably certain I learned it from some code examples on the Internet. I changed it slightly to read "<META content=IE=10.0000 http-equiv=X-UA-Compatible>," but this does not seem to have affected anything. The tool still works in IE but not Firefox.
  2. As for CheckboxUpdate, it is a visual basic script that appears later in the header after two (2) of the three (3) javascripts including both of the scripts referencing the code lines previously discussed. It is used to restore all of the checkboxes on the form to the answer "No." This is part of the form reset. I can't explain why this error appears unless it has something to do with the order of appearance in the header, but since it is in the header and not the body, it should work no matter where it appears in the header.

I should add, in case you have not already discovered this fact, that most of my html, javascript and php programming is self-taught over several years.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...